diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-03-05 23:34:37 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2019-03-06 14:28:25 +0000 |
| commit | 6c3e31373fbd5b7e36d6fc6977ac74508429b477 (patch) | |
| tree | 768ab16529dd1340afe7473ba8042af1190b88a4 /src/text-chemistry.cpp | |
| parent | Ignore more stuff (diff) | |
| download | inkscape-6c3e31373fbd5b7e36d6fc6977ac74508429b477.tar.gz inkscape-6c3e31373fbd5b7e36d6fc6977ac74508429b477.zip | |
Do partial convert flowed text to tspan if possible
Fixes https://gitlab.com/inkscape/inbox/issues/193
Diffstat (limited to 'src/text-chemistry.cpp')
| -rw-r--r-- | src/text-chemistry.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp index 371346442..8a2433ec6 100644 --- a/src/text-chemistry.cpp +++ b/src/text-chemistry.cpp @@ -511,6 +511,7 @@ flowtext_to_text() } bool did = false; + bool ignored = false; std::vector<Inkscape::XML::Node*> reprs; std::vector<SPItem*> items(selection->items().begin(), selection->items().end()); @@ -522,10 +523,8 @@ flowtext_to_text() continue; if (!SP_FLOWTEXT(item)->layout.outputExists()) { - desktop->getMessageStack()-> - flash(Inkscape::WARNING_MESSAGE, - _("The flowed text(s) must be <b>visible</b> in order to be converted.")); - return; + ignored = true; + continue; } Inkscape::XML::Node *repr = SP_FLOWTEXT(item)->getAsText(); @@ -547,12 +546,17 @@ flowtext_to_text() reprs.push_back(repr); } - if (did) { DocumentUndo::done(desktop->getDocument(), SP_VERB_OBJECT_FLOWTEXT_TO_TEXT, _("Convert flowed text to text")); selection->setReprList(reprs); + } else if (ignored) { + // no message for (did && ignored) because it is immediately overwritten + desktop->getMessageStack()-> + flash(Inkscape::ERROR_MESSAGE, + _("Flowed text(s) must be <b>visible</b> in order to be converted.")); + } else { desktop->getMessageStack()-> flash(Inkscape::ERROR_MESSAGE, |
