diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index f912d66146b138aa9f21ceb4f07f92effdc8ed0b..1fcbc29a9eb9927aa10b110c16613ce3dc5c1b41 100644 (file)
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
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_spiral_finish(sc);
+ }
+ // do not return true, so that space would work switching to selector
+ }
+ break;
+
default:
break;
}
SPSpiral *spiral = SP_SPIRAL(sc->item);
sp_shape_set_shape(SP_SHAPE(spiral));
- SP_OBJECT(spiral)->updateRepr(NULL, SP_OBJECT_WRITE_EXT);
+ SP_OBJECT(spiral)->updateRepr(SP_OBJECT_WRITE_EXT);
sp_canvas_end_forced_full_redraws(desktop->canvas);