summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b8b98f4)
raw | patch | inline | side by side (parent: b8b98f4)
author | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 22 Apr 2007 00:22:57 +0000 (00:22 +0000) | ||
committer | johncoswell <johncoswell@users.sourceforge.net> | |
Sun, 22 Apr 2007 00:22:57 +0000 (00:22 +0000) |
src/flood-context.cpp | patch | blob | history |
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 33281995752fffa36e3ae00c876d5395fd731b31..dbfc6df8ebba429ba99087695c2452594d60b9e7 100644 (file)
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -820,16 +820,18 @@ static gint sp_flood_context_root_handler(SPEventContext *event_context, GdkEven
NR::Point const button_w(event->button.x,
event->button.y);
- // save drag origin
- event_context->xp = (gint) button_w[NR::X];
- event_context->yp = (gint) button_w[NR::Y];
- event_context->within_tolerance = true;
-
- dragging = true;
-
- NR::Point const p(desktop->w2d(button_w));
- Inkscape::Rubberband::get()->setMode(RUBBERBAND_MODE_TOUCHPATH);
- Inkscape::Rubberband::get()->start(desktop, p);
+ if (Inkscape::have_viable_layer(desktop, event_context->defaultMessageContext())) {
+ // save drag origin
+ event_context->xp = (gint) button_w[NR::X];
+ event_context->yp = (gint) button_w[NR::Y];
+ event_context->within_tolerance = true;
+
+ dragging = true;
+
+ NR::Point const p(desktop->w2d(button_w));
+ Inkscape::Rubberband::get()->setMode(RUBBERBAND_MODE_TOUCHPATH);
+ Inkscape::Rubberband::get()->start(desktop, p);
+ }
}
}
case GDK_MOTION_NOTIFY: