diff --git a/src/node-context.cpp b/src/node-context.cpp
index 1e01b1af9ac59e00602c3087623db0455cd4e89e..67511ea30e83c3e0a4f4445e3c9da1fdc5084608 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
((SPEventContextClass *) parent_class)->setup(ec);
nc->sel_changed_connection.disconnect();
- nc->sel_changed_connection = SP_DT_SELECTION(ec->desktop)->connectChanged(sigc::bind(sigc::ptr_fun(&sp_node_context_selection_changed), (gpointer)nc));
+ nc->sel_changed_connection = sp_desktop_selection(ec->desktop)->connectChanged(sigc::bind(sigc::ptr_fun(&sp_node_context_selection_changed), (gpointer)nc));
- Inkscape::Selection *selection = SP_DT_SELECTION(ec->desktop);
+ Inkscape::Selection *selection = sp_desktop_selection(ec->desktop);
SPItem *item = selection->singleItem();
nc->nodepath = NULL;
ec->shape_knot_holder = NULL;
}
- Inkscape::Selection *selection = SP_DT_SELECTION(desktop);
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
item = selection->singleItem();
if (item) {
@@ -405,7 +405,7 @@ sp_node_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEve
gint ret = FALSE;
SPDesktop *desktop = event_context->desktop;
- Inkscape::Selection *selection = SP_DT_SELECTION (desktop);
+ Inkscape::Selection *selection = sp_desktop_selection (desktop);
SPNodeContext *nc = SP_NODE_CONTEXT(event_context);
sp_node_context_root_handler(SPEventContext *event_context, GdkEvent *event)
{
SPDesktop *desktop = event_context->desktop;
- Inkscape::Selection *selection = SP_DT_SELECTION (desktop);
+ Inkscape::Selection *selection = sp_desktop_selection (desktop);
SPNodeContext *nc = SP_NODE_CONTEXT(event_context);
double const nudge = prefs_get_double_attribute_limited("options.nudgedistance", "value", 2, 0, 1000); // in px
if (nc->nodepath && nc->nodepath->selected)
sp_nodepath_deselect(nc->nodepath);
else
- SP_DT_SELECTION(desktop)->clear();
+ sp_desktop_selection(desktop)->clear();
}
}
ret = TRUE;
case GDK_Delete:
case GDK_KP_Delete:
case GDK_BackSpace:
- // with any modifiers
- sp_node_selected_delete();
+ if (MOD__CTRL_ONLY) {
+ sp_node_selected_delete();
+ } else {
+ if (nc->nodepath && nc->nodepath->selected) {
+ sp_node_delete_preserve(g_list_copy(nc->nodepath->selected));
+ }
+ }
ret = TRUE;
break;
case GDK_C:
if (nc->nodepath && nc->nodepath->selected) {
sp_nodepath_deselect(nc->nodepath);
} else {
- SP_DT_SELECTION(desktop)->clear();
+ sp_desktop_selection(desktop)->clear();
}
}
ret = TRUE;