From e7dc78bc53e45767e4bd92fd2e83e56fe20f3dad Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 26 Aug 2007 20:12:59 +0000 Subject: 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. (bzr r3588) --- src/live_effects/parameter/path.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') 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.")); -- cgit v1.2.3