        scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
      }
      event->accept();
    } else if (!can->liveStreaming() && event->button() == Qt::RightButton) {
      emit zoomReset();
      event->accept();
    } else {
      QGraphicsView::mouseReleaseEvent(event);
    }
  
 
</s> remove   zoomIn(display_range.first, display_range.second);
 </s> add   setZoom(display_range.first, display_range.second);
}

void ChartsWidget::zoomUndo() {
  if (!zoom_stack.isEmpty()) {
    auto r = zoom_stack.pop();
    setZoom(r.first, r.second);
  } else {
    zoomReset();
  } </s> remove     // loop in zoommed range
 </s> add     // loop in zoomed range </s> remove void ChartsWidget::zoomIn(double min, double max) {
 </s> add void ChartsWidget::setZoom(double min, double max) {
    emit zoomUndo();
        scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
      }
      event->accept();
    } else if (!can->liveStreaming() && event->button() == Qt::RightButton) {
    emit zoomUndo();
      event->accept();
    } else {
      QGraphicsView::mouseReleaseEvent(event);
    }
  
keep keep keep keep replace keep keep keep keep keep
 cabana: go to previous zoom window (#27702)

* cabana: go to previous zoom level

* zoom undo on right click

* catch mousepress event on linux 
tools/cabana/chartswidget.cc