Code

Don't unnecessarily block button press
authorcilix42 <cilix42@users.sourceforge.net>
Mon, 18 Aug 2008 18:04:54 +0000 (18:04 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Mon, 18 Aug 2008 18:04:54 +0000 (18:04 +0000)
src/lpe-tool-context.cpp

index ed243c1b2de30d5690c4f1ab3b5952fde1ff4e15..9c8b5fea33725cd70a6ec5d112a860ce3a095ee5 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <2geom/sbasis-geometric.h>
 #include <gdk/gdkkeysyms.h>
-//#include <gtk/gtkobject.h>
 
 #include "macros.h"
 #include "forward.h"
@@ -224,14 +223,14 @@ sp_lpetool_context_root_handler(SPEventContext *event_context, GdkEvent *event)
 
     switch (event->type) {
         case GDK_BUTTON_PRESS:
-            if (lc->mode == Inkscape::LivePathEffect::INVALID_LPE) {
-                // don't do anything for now if we are inactive
-                desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Choose a construction tool from the toolbar."));
-                ret = true;
-                break;
-            }
-
             if (event->button.button == 1 && !event_context->space_panning) {
+                if (lc->mode == Inkscape::LivePathEffect::INVALID_LPE) {
+                    // don't do anything for now if we are inactive
+                    desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Choose a construction tool from the toolbar."));
+                    ret = true;
+                    break;
+                }
+
                 // save drag origin
                 event_context->xp = (gint) event->button.x;
                 event_context->yp = (gint) event->button.y;