    QObject::connect(range_slider, &QSlider::valueChanged, this, &ChartsWidget::setMaxChartRange);
    QObject::connect(new_plot_btn, &QAction::triggered, this, &ChartsWidget::newChart);
    QObject::connect(remove_all_btn, &QAction::triggered, this, &ChartsWidget::removeAll);
    QObject::connect(reset_zoom_action, &QAction::triggered, this, &ChartsWidget::zoomReset);
    QObject::connect(&settings, &Settings::changed, this, &ChartsWidget::settingChanged);
    QObject::connect(dock_btn, &QAction::triggered, [this]() {
      emit dock(!docking);
 
</s> remove   QObject::connect(chart, &ChartView::zoomReset, this, &ChartsWidget::zoomReset);
 </s> add   QObject::connect(chart, &ChartView::zoomUndo, this, &ChartsWidget::zoomUndo); </s> remove     emit zoomReset();
 </s> add     emit zoomUndo(); </s> remove void ChartsWidget::zoomIn(double min, double max) {
 </s> add void ChartsWidget::setZoom(double min, double max) { </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();
  }
  QObject::connect(undo_zoom_action, &QAction::triggered, this, &ChartsWidget::zoomUndo);
    QObject::connect(range_slider, &QSlider::valueChanged, this, &ChartsWidget::setMaxChartRange);
    QObject::connect(new_plot_btn, &QAction::triggered, this, &ChartsWidget::newChart);
    QObject::connect(remove_all_btn, &QAction::triggered, this, &ChartsWidget::removeAll);
  QObject::connect(undo_zoom_action, &QAction::triggered, this, &ChartsWidget::zoomUndo);
    QObject::connect(reset_zoom_action, &QAction::triggered, this, &ChartsWidget::zoomReset);
    QObject::connect(&settings, &Settings::changed, this, &ChartsWidget::settingChanged);
    QObject::connect(dock_btn, &QAction::triggered, [this]() {
      emit dock(!docking);
keep keep add 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