summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgustav_b <gustav_b@users.sourceforge.net>2007-01-11 22:09:44 +0000
committergustav_b <gustav_b@users.sourceforge.net>2007-01-11 22:09:44 +0000
commita6ce0bedbf4ef61d590f745f3bfee6e163be70cf (patch)
tree43065cd5d2348a9357fdcacf93aa8011df4a3c70
parentusing italian tutorial-shapes (diff)
downloadinkscape-a6ce0bedbf4ef61d590f745f3bfee6e163be70cf.tar.gz
inkscape-a6ce0bedbf4ef61d590f745f3bfee6e163be70cf.zip
Fix 1633473 (Crash on "Convert to Text")
(bzr r2186)
-rw-r--r--src/text-chemistry.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 4ea47fd27..91c263584 100644
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
@@ -110,7 +110,17 @@ text_put_on_path()
// if a flowed text is selected, convert it to a regular text object
if (SP_IS_FLOWTEXT(text)) {
+
+ if (!SP_FLOWTEXT(text)->layout.outputExists()) {
+ sp_desktop_message_stack(desktop)->
+ flash(Inkscape::WARNING_MESSAGE,
+ _("The flowed text(s) must be <b>visible</b> in order to be put on a path."));
+ }
+
Inkscape::XML::Node *repr = SP_FLOWTEXT(text)->getAsText();
+
+ if (!repr) return;
+
Inkscape::XML::Node *parent = SP_OBJECT_REPR(text)->parent();
parent->appendChild(repr);
@@ -455,9 +465,19 @@ flowtext_to_text()
if (!SP_IS_FLOWTEXT(item))
continue;
- did = true;
+ if (!SP_FLOWTEXT(item)->layout.outputExists()) {
+ sp_desktop_message_stack(desktop)->
+ flash(Inkscape::WARNING_MESSAGE,
+ _("The flowed text(s) must be <b>visible</b> in order to be converted."));
+ return;
+ }
Inkscape::XML::Node *repr = SP_FLOWTEXT(item)->getAsText();
+
+ if (!repr) break;
+
+ did = true;
+
Inkscape::XML::Node *parent = SP_OBJECT_REPR(item)->parent();
parent->appendChild(repr);