From 395eaa706a20a19696faa6b30d37c74bb3e17984 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sun, 26 Aug 2007 20:12:59 +0000 Subject: [PATCH] Temporary fix LPE "2Geom not implemented" crash when pasting paths with 'A' in it (arcs) The code should be removed when 2geom is capable of handling 'A' parameters. --- src/live_effects/parameter/path.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 343a2f840..4c73f0aee 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -143,10 +143,15 @@ PathParam::on_paste_button_click() if (!strcmp (repr->name(), "svg:path")) { const char * svgd = repr->attribute("d"); if (svgd) { - param_write_to_repr(svgd); - signal_path_pasted.emit(); - sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, - _("Paste path parameter")); + if (strchr(svgd,'A')) { // FIXME: temporary hack until 2Geom supports arcs in SVGD + SP_ACTIVE_DESKTOP->messageStack()->flash( Inkscape::WARNING_MESSAGE, + _("This effect does not support arcs yet, try to convert to path.") ); + } else { + param_write_to_repr(svgd); + signal_path_pasted.emit(); + sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, + _("Paste path parameter")); + } } } else { SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Clipboard does not contain a path.")); -- 2.30.2