Zoom out with QwtPlotZoomer
Hello,
I've implemented a Zoomer for a plot and it is working fine, except for the zoom out, that keeps inverting the x-axis when it reaches the zoom base. I mean, I click the mouse right bottom and it zooms out till the zoom base. Then, the next click inverts the x axis: it goes from [0 to 10000] to [10000 to 0]. When I click the right button again, it inverts the x-axis again, going back to [0-10000]
Code:
_zoomer
->setTrackerMode
( QwtPicker::AlwaysOff );
_zoomer
->setRubberBand
( QwtPicker::RectRubberBand );
_zoomer
->setRubberBandPen
( QColor( Qt
::green ) );
_zoomer
->setTrackerMode
( QwtPicker::ActiveOnly );
_zoomer
->setTrackerPen
( QColor( Qt
::white ) );
_zoomer
->setMousePattern
(QwtEventPattern::MouseSelect1,Qt
::LeftButton);
//zoom in_zoomer
->setMousePattern
( QwtEventPattern::MouseSelect3,Qt
::RightButton );
//zoom out by 1_zoomer
->setMousePattern
( QwtEventPattern::MouseSelect2,Qt
::RightButton, Qt
::ControlModifier );
// Ctrl+RightButton: zoom out to full size
Any ideas?
Thanks,
Vonheld