From 808185e9cafa72847b1d2ffc0b83df7ef8d99ef2 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Wed, 18 Apr 2007 01:46:21 +0000 Subject: fix crash when pressing space while drawing a shape (bzr r2922) --- src/arc-context.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/arc-context.cpp') diff --git a/src/arc-context.cpp b/src/arc-context.cpp index db64d7951..4a8d6b9d1 100644 --- a/src/arc-context.cpp +++ b/src/arc-context.cpp @@ -357,6 +357,21 @@ static gint sp_arc_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_arc_finish(ac); + } + // do not return true, so that space would work switching to selector + } + break; + default: break; } -- cgit v1.2.3