From 05f008356889de30ff55df1f73030003ed7cc312 Mon Sep 17 00:00:00 2001 From: Eric Greveson Date: Mon, 12 Aug 2013 16:39:48 +0100 Subject: Allow Object to Path verb from non-GUI (DBus) interface (bzr r12473.1.1) --- src/path-chemistry.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/path-chemistry.cpp') diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp index b192904ce..e1924664b 100644 --- a/src/path-chemistry.cpp +++ b/src/path-chemistry.cpp @@ -294,18 +294,16 @@ sp_selected_path_break_apart(SPDesktop *desktop) /* This function is an entry point from GUI */ void -sp_selected_path_to_curves(SPDesktop *desktop, bool interactive) +sp_selected_path_to_curves(Inkscape::Selection *selection, SPDesktop *desktop, bool interactive) { - Inkscape::Selection *selection = sp_desktop_selection(desktop); - if (selection->isEmpty()) { - if (interactive) + if (interactive && desktop) sp_desktop_message_stack(desktop)->flash(Inkscape::WARNING_MESSAGE, _("Select object(s) to convert to path.")); return; } bool did = false; - if (interactive) { + if (interactive && desktop) { desktop->messageStack()->flash(Inkscape::IMMEDIATE_MESSAGE, _("Converting objects to paths...")); // set "busy" cursor desktop->setWaitingCursor(); @@ -324,7 +322,7 @@ sp_selected_path_to_curves(SPDesktop *desktop, bool interactive) g_slist_free (to_select); g_slist_free (selected); - if (interactive) { + if (interactive && desktop) { desktop->clearWaitingCursor(); if (did) { DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_OBJECT_TO_CURVE, -- cgit v1.2.3