QwtPlotZoomer- problem with zoom out
Hallo,
Though there's been post previously on more or less similar issue I can't figure out my problem. Any help would be great.
In my plot I could use zoom-in perfectly okay using left mouse button. But while using right-button to zoom out there is some problem.
Say, I zoom 2 times: org->stage 1->stage 2. Then on right click once it gets back to stage 1. But when I right click again the plot vanishes, and
the y-axis scale shows 0-1000. Irrespective of how many times it was zoomed, the last click (right) always shows the same (i.e no plot & 0-1000 scale).
Code:
{
public:
Zoomer
( int xAxis,
int yAxis,
QWidget *canvas
): {
setRubberBandPen
( QColor( Qt
::darkGreen ) );
Qt::RightButton, Qt::ControlModifier );
Qt::RightButton );
}
...
};
Re: QwtPlotZoomer- problem with zoom out
0 -> 1000 is the default range of a scale , obviously you have initialized the zoomer before setting the scales. See QwtPlotZoomer::setZoomBase() for how to sync the zoomer with the modified scales.
Uwe
Re: QwtPlotZoomer- problem with zoom out
Thank you so much Uwe. That was indeed the problem i.e initializing the zoomer before setting the scale. Now it works fine.