[qet] qet/qet: [5235] Fix scroll mouse to lower it can flips the diagram, thanks Gabberworld for this patch

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5235
Author:   scorpio810
Date:     2018-02-10 17:32:57 +0100 (Sat, 10 Feb 2018)
Log Message:
-----------
Fix scroll mouse to lower it can flips the diagram, thanks Gabberworld for this patch

Modified Paths:
--------------
    trunk/sources/diagramview.cpp

Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp	2018-02-08 04:15:35 UTC (rev 5234)
+++ trunk/sources/diagramview.cpp	2018-02-10 16:32:57 UTC (rev 5235)
@@ -289,7 +289,9 @@
 		QSettings settings;
 		if (settings.value("diagrameditor/zoom-out-beyond-of-folio", false).toBool() ||
 			(horizontalScrollBar()->maximum() || verticalScrollBar()->maximum()) )
-			scale(zoom_factor, zoom_factor);
+			if (zoom_factor >= 0){
+				scale(zoom_factor, zoom_factor);
+			}
 	}
 	m_diagram->adjustSceneRect();
 	adjustGridToZoom();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/