Changeset - 60d04e19e663
[Not reviewed]
scrollbar
0 2 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2016-10-29 15:20:33
hy@ozderya.net
fix zoombase setting
2 files changed with 12 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/zoomer.cpp
Show inline comments
 
@@ -29,11 +29,6 @@ Zoomer::Zoomer(QWidget* widget, bool doR
 

	
 
void Zoomer::zoom(int up)
 
{
 
    if (up == +1)
 
    {
 
        this->setZoomBase(this->plot());
 
    }
 

	
 
    ScrollZoomer::zoom(up);
 

	
 
    if(zoomRectIndex() == 0)
 
@@ -41,3 +36,14 @@ void Zoomer::zoom(int up)
 
        emit unzoomed();
 
    }
 
}
 

	
 
void Zoomer::zoom( const QRectF & rect)
 
{
 
    // set the zoom base when user zooms in to first level
 
    if (zoomRectIndex() == 0)
 
    {
 
        this->setZoomBase(false);
 
    }
 

	
 
    ScrollZoomer::zoom(rect);
 
}
src/zoomer.h
Show inline comments
 
@@ -29,6 +29,7 @@ class Zoomer : public ScrollZoomer
 
public:
 
    Zoomer(QWidget *, bool doReplot=true);
 
    void zoom(int up);
 
    void zoom( const QRectF & );
 

	
 
signals:
 
    void unzoomed();
0 comments (0 inline, 0 general)