Results 1 to 3 of 3

Thread: Two zoomers - two replots on zoom action?

  1. #1
    Join Date
    Jul 2009
    Posts
    12
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Two zoomers - two replots on zoom action?

    Hello,

    I'm using Qwt6 (SVN) I have two zoomers in my plot (one for yLeft/xBottom, the other for yRight/xTop). The thing is, each time I zoom in or zoom out, I see the plot render two times - once for each zoomer.
    Since the data I'm plotting is quite large (curves with 10K points), the two redraws are clearly visible. I traced it to QwtPlotZoomer::rescale(), where it explicitly calls replot().
    Is this a bug?

    Thanks, Alexander.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,199
    Thanked 847 Times in 796 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Two zoomers - two replots on zoom action?

    Quote Originally Posted by torrentss View Post
    I traced it to QwtPlotZoomer::rescale(), where it explicitly calls replot().
    Is this a bug?
    No its more a consequence of a weak design. But there are enough virtual methods to implement something, that blocks an unwanted replot.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    torrentss (20th August 2010)

  4. #3
    Join Date
    Jul 2009
    Posts
    12
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Two zoomers - two replots on zoom action?

    Thanks.
    I reimplemented QwtPlotZoomer::rescale() in a child class, and made both zoomers instances of that class.
    The new rescale() calls replot() only on every second call, which seems to do what I want.

Similar Threads

  1. Enable/Disable Zoom with a checkable action
    By yannwilfried in forum Qwt
    Replies: 2
    Last Post: 2nd December 2009, 15:30
  2. Replies: 1
    Last Post: 16th November 2009, 05:25
  3. QGLWidget with text - zoom in / zoom out
    By h123 in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2008, 09:56
  4. QwtPlotZoomer, using two zoomers.
    By jma in forum Qwt
    Replies: 2
    Last Post: 30th September 2008, 08:29
  5. No action checked in an exclusive action group
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 13th February 2006, 06:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.