Changeset - fbe70e32bc1a
[Not reviewed]
Hasan Yavuz Ă–ZDERYA - 8 years ago 2017-08-16 08:26:42
hy@ozderya.net
fix wrong view size, y axis scroll is broken
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/scrollzoomer.cpp
Show inline comments
 
@@ -79,19 +79,20 @@ void ScrollZoomer::setHViewSize(double s
 

	
 
void ScrollZoomer::setZoomBase(bool doReplot)
 
{
 
    QwtPlotZoomer::setZoomBase(doReplot);
 
    auto zb = zoomBase();
 
    auto zs = zoomStack();
 
    zb.setRight(xMax);
 
    if ((xMax - xMin) < hViewSize)
 
    {
 
        zb.setWidth(xMax - xMin);
 
        zb.setLeft(xMin);
 
    }
 
    else
 
    {
 
        zb.setWidth(hViewSize);
 
        zb.setLeft(xMax-hViewSize);
 
    }
 
    zs[0] = zb;
 
    setZoomStack(zs);
 
}
 

	
 
void ScrollZoomer::rescale()
0 comments (0 inline, 0 general)