diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 63c95fc29d..a3d849bafc 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -916,20 +916,20 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ auto s=xAxis->getSize1(painter); internalPlotMargins[PlotMarginUse::muAxesOutside].bottom+=s.requiredSize; if (s.elongateMin>0) elongateLeft=qMax(elongateLeft,s.elongateMin); - if (s.elongateMax>0) elongateRight=qMax(elongateRight,s.elongateMax); + if (s.elongateMax>0) elongateRight=qMin(elongateRight,s.elongateMax); s=xAxis->getSize2(painter); if (s.elongateMin>0) elongateLeft=qMax(elongateLeft,s.elongateMin); - if (s.elongateMax>0) elongateRight=qMax(elongateRight,s.elongateMax); + if (s.elongateMax>0) elongateRight=qMin(elongateRight,s.elongateMax); internalPlotMargins[PlotMarginUse::muAxesOutside].top+=s.requiredSize; double elongateBottom=0,elongateTop=0; s=yAxis->getSize1(painter); if (s.elongateMin>0) elongateBottom=qMax(elongateBottom,s.elongateMin); - if (s.elongateMax>0) elongateTop=qMax(elongateTop,s.elongateMax); + if (s.elongateMax>0) elongateTop=qMin(elongateTop,s.elongateMax); internalPlotMargins[PlotMarginUse::muAxesOutside].left+=s.requiredSize; s=yAxis->getSize2(painter); if (s.elongateMin>0) elongateBottom=qMax(elongateBottom,s.elongateMin); - if (s.elongateMax>0) elongateTop=qMax(elongateTop,s.elongateMax); + if (s.elongateMax>0) elongateTop=qMin(elongateTop,s.elongateMax); internalPlotMargins[PlotMarginUse::muAxesOutside].right+=s.requiredSize; diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index 20573adc97..78dfbd1b35 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -1140,6 +1140,9 @@ void JKQTPlotter::wheelEvent ( QWheelEvent * event ) { if (d.y()>=1 && d.y()<10) d.setY(10); if (d.y()<=-1 && d.y()>-10) d.setY(-10); } + }else{ + event->ignore(); + return; } @@ -1413,8 +1416,10 @@ void JKQTPlotter::resizeEvent(QResizeEvent *event) { // Do this now delayedResizeEvent(); } else { - resizeTimer.setSingleShot(true); - resizeTimer.start(jkqtp_RESIZE_DELAY); + if(!resizeTimer.isActive()){ + resizeTimer.setSingleShot(true); + resizeTimer.start(jkqtp_RESIZE_DELAY); + } } }