diff --git a/src/node-context.cpp b/src/node-context.cpp
index 2e5fd3e7307d8d6e45833362491b042fad96a426..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;
if (MOD__CTRL_ONLY) {
sp_node_selected_delete();
} else {
- sp_node_delete_preserve(g_list_copy(nc->nodepath->selected));
+ if (nc->nodepath && nc->nodepath->selected) {
+ sp_node_delete_preserve(g_list_copy(nc->nodepath->selected));
+ }
}
ret = TRUE;
break;
if (nc->nodepath && nc->nodepath->selected) {
sp_nodepath_deselect(nc->nodepath);
} else {
- SP_DT_SELECTION(desktop)->clear();
+ sp_desktop_selection(desktop)->clear();
}
}
ret = TRUE;