diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-04-18 01:46:21 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-04-18 01:46:21 +0000 |
| commit | 808185e9cafa72847b1d2ffc0b83df7ef8d99ef2 (patch) | |
| tree | 479d637cb781ab083ee5fa9e6ee3a1307317ae25 /src/rect-context.cpp | |
| parent | fix leftover rubberband after switching to selector while dragging (diff) | |
| download | inkscape-808185e9cafa72847b1d2ffc0b83df7ef8d99ef2.tar.gz inkscape-808185e9cafa72847b1d2ffc0b83df7ef8d99ef2.zip | |
fix crash when pressing space while drawing a shape
(bzr r2922)
Diffstat (limited to '')
| -rw-r--r-- | src/rect-context.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rect-context.cpp b/src/rect-context.cpp index b6c331538..c8f9bf0f1 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -400,6 +400,21 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent case GDK_Escape: sp_desktop_selection(desktop)->clear(); //TODO: make dragging escapable by Esc + break; + + case GDK_space: + if (dragging) { + sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), + event->button.time); + dragging = false; + if (!event_context->within_tolerance) { + // we've been dragging, finish the rect + sp_rect_finish(rc); + } + // do not return true, so that space would work switching to selector + } + break; + default: break; } |
