[qet] [2090] Change the wheel event for zoomIn and zoomOut directly

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


Revision: 2090
Author:   cfdev
Date:     2013-04-06 20:54:32 +0200 (Sat, 06 Apr 2013)
Log Message:
-----------
Change the wheel event for zoomIn and zoomOut directly

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

Modified: trunk/sources/diagramview.cpp
===================================================================
--- trunk/sources/diagramview.cpp	2013-04-06 14:32:39 UTC (rev 2089)
+++ trunk/sources/diagramview.cpp	2013-04-06 18:54:32 UTC (rev 2090)
@@ -433,19 +433,14 @@
 }
 
 /**
-	Gere les actions liees a la rollette de la souris
-	@param e QWheelEvent decrivant l'evenement rollette
+	Manage wheel event of mouse
+	@param e QWheelEvent
 */
 void DiagramView::wheelEvent(QWheelEvent *e) {
-	// si la touche Ctrl est enfoncee, on zoome / dezoome
-	if (e -> modifiers() & Qt::ControlModifier) {
-		if (e -> delta() > 0) {
-			zoomIn();
-		} else {
-			zoomOut();
-		}
+	if (e -> delta() > 0) {
+		zoomIn();
 	} else {
-		QAbstractScrollArea::wheelEvent(e);
+		zoomOut();
 	}
 }
 
@@ -711,7 +706,7 @@
 }
 
 /**
-	Active ou desactive le dessin de grille selon la quantite de pixels affichee
+	Enables or disables the drawing grid according to the amount of pixels display
 */
 void DiagramView::adjustGridToZoom() {
 	QRectF viewed_scene = viewedSceneRect();


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