Gianni Ambrosio | 28 Apr 13:33

clear zoom stack

Hi all,
is there a way to clear the zoom stack without forcing a replot?

I need to synchronize several QwtPlot objects. To do that I basically 
call a zoom(rect). But since the plots may also have an independent zoom 
I cannot live with the actual zoom stack during synchronization. That 
means I have to clear the previous zoom stack.

I found a workaround as follows but I would like to know if there is a 
better way to implement that.

derive MyPlot from QwtPlot
reimplement replot() virtual method and check for a flag. Call 
QwtPlot::replot() depending on that flag.
in the sync zoom method:
- set the flag to false to disable replot
- zoomer->zoom(0)
- set the flag to true to reset the default behaviour

Thanks for your help
Gianni

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

Gmane