From: gustav_b Date: Thu, 11 Jan 2007 22:09:44 +0000 (+0000) Subject: Fix 1633473 (Crash on "Convert to Text") X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=02cdb1b78f658eac5cc81b3d048d06ed77ce6a98;p=inkscape.git Fix 1633473 (Crash on "Convert to Text") --- 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 visible 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 visible 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);