    range_lb->setText(QString("Range: %1:%2 ").arg(max_chart_range / 60, 2, 10, QLatin1Char('0')).arg(max_chart_range % 60, 2, 10, QLatin1Char('0')));
    range_lb_action->setVisible(!is_zoomed);
    range_slider_action->setVisible(!is_zoomed);
    reset_zoom_action->setVisible(is_zoomed);
    reset_zoom_action->setText(is_zoomed ? tr("Zoomin: %1-%2").arg(zoomed_range.first, 0, 'f', 1).arg(zoomed_range.second, 0, 'f', 1) : "");
    remove_all_btn->setEnabled(!charts.isEmpty());
    dock_btn->setIcon(utils::icon(docking ? "arrow-up-right-square" : "arrow-down-left-square"));
    dock_btn->setToolTip(docking ? tr("Undock charts") : tr("Dock charts"));
  }
 
</s> remove     // loop in zoommed range
 </s> add     // loop in zoomed range </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   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();
  }
  undo_zoom_action->setVisible(is_zoomed);
    range_lb->setText(QString("Range: %1:%2 ").arg(max_chart_range / 60, 2, 10, QLatin1Char('0')).arg(max_chart_range % 60, 2, 10, QLatin1Char('0')));
    range_lb_action->setVisible(!is_zoomed);
    range_slider_action->setVisible(!is_zoomed);
  undo_zoom_action->setVisible(is_zoomed);
    reset_zoom_action->setVisible(is_zoomed);
    reset_zoom_action->setText(is_zoomed ? tr("Zoomin: %1-%2").arg(zoomed_range.first, 0, 'f', 1).arg(zoomed_range.second, 0, 'f', 1) : "");
    remove_all_btn->setEnabled(!charts.isEmpty());
    dock_btn->setIcon(utils::icon(docking ? "arrow-up-right-square" : "arrow-down-left-square"));
    dock_btn->setToolTip(docking ? tr("Undock charts") : tr("Dock charts"));
  }
keep keep add keep 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