mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Swap Zoom and Select on LTM/Ride Plot
This is a perennial issue for new users. The default action when click dragging on a chart is to Zoom -- this was probably right when we had no span sliders or stack view (and no facility for marking intervals either). But now, most users will expect click and drag on a metric chart or ride plot to mark an interval or date range. We get regular feature requests and bug reports related to this -- basically the mouse actions are not intuitive. Where selection is not meaningful (e.g. histogram) then left click will zoom. This should be reasonably intuitive to most users. Fixes #398.
This commit is contained in:
@@ -160,6 +160,8 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
|
||||
// RightButton: zoom out by 1
|
||||
// Ctrl+RightButton: zoom out to full size
|
||||
allZoomer->setMousePattern(QwtEventPattern::MouseSelect1,
|
||||
Qt::LeftButton, Qt::ShiftModifier);
|
||||
allZoomer->setMousePattern(QwtEventPattern::MouseSelect2,
|
||||
Qt::RightButton, Qt::ControlModifier);
|
||||
allZoomer->setMousePattern(QwtEventPattern::MouseSelect3,
|
||||
@@ -179,7 +181,7 @@ AllPlotWindow::AllPlotWindow(MainWindow *mainWindow) :
|
||||
"");
|
||||
allPlot->tooltip->setSelectionFlags(QwtPicker::PointSelection | QwtPicker::RectSelection | QwtPicker::DragSelection);
|
||||
allPlot->tooltip->setRubberBand(QwtPicker::VLineRubberBand);
|
||||
allPlot->tooltip->setMousePattern(QwtEventPattern::MouseSelect1, Qt::LeftButton, Qt::ShiftModifier);
|
||||
allPlot->tooltip->setMousePattern(QwtEventPattern::MouseSelect1, Qt::LeftButton);
|
||||
allPlot->tooltip->setTrackerPen(QColor(Qt::black));
|
||||
QColor inv(Qt::white);
|
||||
inv.setAlpha(0);
|
||||
|
||||
@@ -67,6 +67,8 @@ LTMWindow::LTMWindow(MainWindow *parent, bool useMetricUnits, const QDir &home)
|
||||
| QwtPicker::CornerToCorner);
|
||||
ltmZoomer->setTrackerMode(QwtPicker::AlwaysOff);
|
||||
ltmZoomer->setEnabled(false);
|
||||
ltmZoomer->setMousePattern(QwtEventPattern::MouseSelect1,
|
||||
Qt::LeftButton, Qt::ShiftModifier);
|
||||
ltmZoomer->setMousePattern(QwtEventPattern::MouseSelect2,
|
||||
Qt::RightButton, Qt::ControlModifier);
|
||||
ltmZoomer->setMousePattern(QwtEventPattern::MouseSelect3,
|
||||
@@ -79,7 +81,7 @@ LTMWindow::LTMWindow(MainWindow *parent, bool useMetricUnits, const QDir &home)
|
||||
ltmPlot->canvas(),
|
||||
"");
|
||||
picker->setMousePattern(QwtEventPattern::MouseSelect1,
|
||||
Qt::LeftButton, Qt::ShiftModifier);
|
||||
Qt::LeftButton);
|
||||
picker->setTrackerPen(QColor(Qt::black));
|
||||
QColor inv(Qt::white);
|
||||
inv.setAlpha(0);
|
||||
|
||||
Reference in New Issue
Block a user