From: johanengelen Date: Sun, 26 Aug 2007 20:12:59 +0000 (+0000) Subject: Temporary fix LPE "2Geom not implemented" crash when pasting paths with 'A' in it... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=395eaa706a20a19696faa6b30d37c74bb3e17984;p=inkscape.git 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. --- 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."));