diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-11-22 01:35:24 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-11-22 01:35:24 +0000 |
| commit | d3adc7ff9c3693f68823967787309c817d41be01 (patch) | |
| tree | 810f4ffd24ee02fe4a3f2705780dd7d7bcc4a281 /src/select-context.cpp | |
| parent | rearrange code to make rubberband a bit more interruptibility-proof (diff) | |
| download | inkscape-d3adc7ff9c3693f68823967787309c817d41be01.tar.gz inkscape-d3adc7ff9c3693f68823967787309c817d41be01.zip | |
trying to nail the elusive disabled-mouse bug: if you're going to grab something, ungrab what you was holding before
(bzr r2005)
Diffstat (limited to 'src/select-context.cpp')
| -rw-r--r-- | src/select-context.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/select-context.cpp b/src/select-context.cpp index d883483b3..5d8babe57 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -328,6 +328,10 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE rb_escaped = drag_escaped = 0; + if (sc->grabbed) { + sp_canvas_item_ungrab(sc->grabbed, event->button.time); + sc->grabbed = NULL; + } sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->drawing), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK, @@ -430,6 +434,10 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) NR::Point const button_pt(event->button.x, event->button.y); NR::Point const p(desktop->w2d(button_pt)); Inkscape::Rubberband::get()->start(desktop, p); + if (sc->grabbed) { + sp_canvas_item_ungrab(sc->grabbed, event->button.time); + sc->grabbed = NULL; + } sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK, NULL, event->button.time); |
