summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ddfd24)
raw | patch | inline | side by side (parent: 6ddfd24)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 3 Mar 2007 22:04:04 +0000 (22:04 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 3 Mar 2007 22:04:04 +0000 (22:04 +0000) |
diff --git a/share/keys/default.xml b/share/keys/default.xml
index 39737a82aadc1c90ddb4836505a4451cdb01554e..077742e4c3af18de119268de4673979415fc799c 100644 (file)
--- a/share/keys/default.xml
+++ b/share/keys/default.xml
<bind key="Tab" modifiers="Shift" action="EditSelectPrev" display="true"/>
<bind key="ISO_Left_Tab" modifiers="Shift" action="EditSelectPrev" />
- <bind action="EditDeselect" /> <!-- FIXME: currently deselecting is bypassing the verb, so it's not bound to Esc as it should be -->
+ <bind key="Escape" action="EditDeselect" />
<!-- Objects/selection -->
index 39737a82aadc1c90ddb4836505a4451cdb01554e..077742e4c3af18de119268de4673979415fc799c 100644 (file)
--- a/share/keys/inkscape.xml
+++ b/share/keys/inkscape.xml
<bind key="Tab" modifiers="Shift" action="EditSelectPrev" display="true"/>
<bind key="ISO_Left_Tab" modifiers="Shift" action="EditSelectPrev" />
- <bind action="EditDeselect" /> <!-- FIXME: currently deselecting is bypassing the verb, so it's not bound to Esc as it should be -->
+ <bind key="Escape" action="EditDeselect" />
<!-- Objects/selection -->
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 028d889d9ad503f56a3b44dcdf11a01f27b68656..9390834d133041e3aef00e4f151211b8de40a861 100644 (file)
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
switch (event->type) {
case GDK_KEY_PRESS:
switch (get_group0_keyval (&event->key)) {
- case GDK_Escape:
- sp_desktop_selection(desktop)->clear();
- ret = TRUE;
- break;
case GDK_Up:
case GDK_Down:
case GDK_KP_Up:
index 1ec0d7fde64e5919f21b7bd6a54f20bb31474d99..ba44df3ce784e05ebcc0a9a18a4598277cc7463c 100644 (file)
desktop->setToolboxAdjustmentValue (id, value);
}
+static void
+calligraphic_cancel(SPDynaDrawContext *dc)
+{
+ SPDesktop *desktop = SP_EVENT_CONTEXT(dc)->desktop;
+ dc->dragging = FALSE;
+ dc->is_drawing = false;
+ sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate), 0);
+ /* Remove all temporary line segments */
+ while (dc->segments) {
+ gtk_object_destroy(GTK_OBJECT(dc->segments->data));
+ dc->segments = g_slist_remove(dc->segments, dc->segments->data);
+ }
+ /* reset accumulated curve */
+ sp_curve_reset(dc->accumulated);
+ clear_current(dc);
+ if (dc->repr) {
+ dc->repr = NULL;
+ }
+}
+
+
gint
sp_dyna_draw_context_root_handler(SPEventContext *event_context,
GdkEvent *event)
}
break;
case GDK_Escape:
- sp_desktop_selection(desktop)->clear();
+ if (dc->is_drawing) {
+ // if drawing, cancel, otherwise pass it up for deselecting
+ calligraphic_cancel (dc);
+ ret = TRUE;
+ }
+ break;
+ case GDK_z:
+ case GDK_Z:
+ if (MOD__CTRL_ONLY && dc->is_drawing) {
+ // if drawing, cancel, otherwise pass it up for undo
+ calligraphic_cancel (dc);
+ ret = TRUE;
+ }
break;
-
default:
break;
}
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index 4c9406e67f0164d63b26f0095c0c01e0a9e0fd4e..6c90dff264eb333e52cd010a6d843b5130cfbf0b 100644 (file)
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -643,8 +643,6 @@ static gint sp_flood_context_root_handler(SPEventContext *event_context, GdkEven
if (!MOD__CTRL_ONLY)
ret = TRUE;
break;
- case GDK_Escape:
- sp_desktop_selection(desktop)->clear();
default:
break;
}