summaryrefslogtreecommitdiffstats
path: root/src/flood-context.cpp
diff options
context:
space:
mode:
authorJohn Bintz <me@johnbintz.com>2007-04-22 00:22:57 +0000
committerjohncoswell <johncoswell@users.sourceforge.net>2007-04-22 00:22:57 +0000
commit210e74062173165c0134e36291a4dfe2a1b2fafc (patch)
tree80f2eb8d9dc5bbdac3c628ff6e25418dce4b4e26 /src/flood-context.cpp
parentremove warnings (diff)
downloadinkscape-210e74062173165c0134e36291a4dfe2a1b2fafc.tar.gz
inkscape-210e74062173165c0134e36291a4dfe2a1b2fafc.zip
Add check for hidden/locked layer
(bzr r2946)
Diffstat (limited to 'src/flood-context.cpp')
-rw-r--r--src/flood-context.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 332819957..dbfc6df8e 100644
--- 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: