Code

Temporary fix LPE "2Geom not implemented" crash when pasting paths with 'A' in it...
authorjohanengelen <johanengelen@users.sourceforge.net>
Sun, 26 Aug 2007 20:12:59 +0000 (20:12 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Sun, 26 Aug 2007 20:12:59 +0000 (20:12 +0000)
The code should be removed when 2geom is capable of handling 'A' parameters.

src/live_effects/parameter/path.cpp

index 343a2f840aa5776f6ee7628400ba4fca60d19d93..4c73f0aeec18f7a9cc7703a6de6acba8bf8ed8c0 100644 (file)
@@ -143,10 +143,15 @@ PathParam::on_paste_button_click()
     if (!strcmp (repr->name(), "svg:path")) {\r
         const char * svgd = repr->attribute("d");\r
         if (svgd) {\r
-            param_write_to_repr(svgd);\r
-            signal_path_pasted.emit();\r
-            sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, \r
-                             _("Paste path parameter"));\r
+            if (strchr(svgd,'A')) { // FIXME: temporary hack until 2Geom supports arcs in SVGD\r
+                SP_ACTIVE_DESKTOP->messageStack()->flash( Inkscape::WARNING_MESSAGE,\r
+                            _("This effect does not support arcs yet, try to convert to path.") );\r
+            } else {\r
+                param_write_to_repr(svgd);\r
+                signal_path_pasted.emit();\r
+                sp_document_done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT, \r
+                                 _("Paste path parameter"));\r
+            }\r
         }\r
     } else {\r
         SP_ACTIVE_DESKTOP->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Clipboard does not contain a path."));\r