summaryrefslogtreecommitdiffstats
path: root/src/star-context.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-04-18 01:46:21 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-04-18 01:46:21 +0000
commit808185e9cafa72847b1d2ffc0b83df7ef8d99ef2 (patch)
tree479d637cb781ab083ee5fa9e6ee3a1307317ae25 /src/star-context.cpp
parentfix leftover rubberband after switching to selector while dragging (diff)
downloadinkscape-808185e9cafa72847b1d2ffc0b83df7ef8d99ef2.tar.gz
inkscape-808185e9cafa72847b1d2ffc0b83df7ef8d99ef2.zip
fix crash when pressing space while drawing a shape
(bzr r2922)
Diffstat (limited to 'src/star-context.cpp')
-rw-r--r--src/star-context.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/star-context.cpp b/src/star-context.cpp
index d6e9f8583..bb002ec89 100644
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
@@ -364,6 +364,21 @@ static gint sp_star_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_star_finish(sc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}