Changeset - 920822e27c83
[Not reviewed]
default
0 1 0
Hasan Yavuz Ă–ZDERYA - 8 years ago 2017-09-03 08:07:18
hy@ozderya.net
don't touch y-scale when setting plot width so that autoscale doesn't break
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/scrollzoomer.cpp
Show inline comments
 
@@ -65,26 +65,28 @@ ScrollZoomer::~ScrollZoomer()
 
    delete d_hScrollData;
 
}
 

	
 
void ScrollZoomer::setXLimits(double min, double max)
 
{
 
    xMin = min;
 
    xMax = max;
 
    setZoomBase();
 
}
 

	
 
void ScrollZoomer::setHViewSize(double size)
 
{
 
    hscrollmove = true;
 
    hViewSize = size;
 
    setZoomBase();
 
    hscrollmove = false;
 
}
 

	
 
void ScrollZoomer::setZoomBase(bool doReplot)
 
{
 
    QwtPlotZoomer::setZoomBase(doReplot);
 
    auto zb = zoomBase();
 
    auto zs = zoomStack();
 
    zb.setRight(xMax);
 
    if ((xMax - xMin) < hViewSize)
 
    {
 
        zb.setLeft(xMin);
 
    }
0 comments (0 inline, 0 general)