Code

Really fix middle click zoom in the node tool.
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Mon, 8 Feb 2010 16:07:50 +0000 (17:07 +0100)
committerKrzysztof Kosiński <tweenk.pl@gmail.com>
Mon, 8 Feb 2010 16:07:50 +0000 (17:07 +0100)
src/ui/tool/selector.cpp

index 8d3cf565059b21a0c746d0cfd46a72d29a06def3..a30f960253b3ce62baa86efe1601995b57bbbc97 100644 (file)
@@ -108,12 +108,14 @@ bool Selector::event(GdkEvent *event)
     case GDK_BUTTON_PRESS:
         // Do not pass button presses other than left button to the control point.
         // This way middle click and right click can be handled in SPEventContext.
-        if (event->button.button != 1) return false;
-        _dragger->setPosition(_desktop->w2d(event_point(event->motion)));
+        if (event->button.button == 1) {
+            _dragger->setPosition(_desktop->w2d(event_point(event->motion)));
+            return _dragger->event(event);
+        }
         break;
     default: break;
     }
-    return _dragger->event(event);
+    return false;
 }
 
 } // namespace UI