summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfa46a0)
raw | patch | inline | side by side (parent: bfa46a0)
author | acspike <acspike@users.sourceforge.net> | |
Sun, 5 Feb 2006 21:39:41 +0000 (21:39 +0000) | ||
committer | acspike <acspike@users.sourceforge.net> | |
Sun, 5 Feb 2006 21:39:41 +0000 (21:39 +0000) |
src/text-chemistry.cpp | patch | blob | history |
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index a61bbdf737a6314e78aa7a4f96dc017e8a9c85ea..549db62282d5354dfde6bd44e92f59e09d3f2c40 100644 (file)
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
return NULL;
}
+SPItem *
+text_or_flowtext_in_selection(Inkscape::Selection *selection)
+{
+ for (GSList *items = (GSList *) selection->itemList();
+ items != NULL;
+ items = items->next) {
+ if (SP_IS_TEXT(items->data) || SP_IS_FLOWTEXT(items->data))
+ return ((SPItem *) items->data);
+ }
+ return NULL;
+}
+
SPItem *
shape_in_selection(Inkscape::Selection *selection)
{
Inkscape::Selection *selection = SP_DT_SELECTION(desktop);
- SPItem *text = text_in_selection(selection);
+ SPItem *text = text_or_flowtext_in_selection(selection);
SPItem *shape = shape_in_selection(selection);
if (!text || !shape || g_slist_length((GSList *) selection->itemList()) != 2) {
}
if (SP_IS_TEXT_TEXTPATH(text)) {
- SP_DT_MSGSTACK(desktop)->flash(Inkscape::ERROR_MESSAGE, _("This text object is <b>already put to a path</b>. Remove it from the path first. Use <b>Shift+D</b> to look up its path."));
+ SP_DT_MSGSTACK(desktop)->flash(Inkscape::ERROR_MESSAGE, _("This text object is <b>already put on a path</b>. Remove it from the path first. Use <b>Shift+D</b> to look up its path."));
+ return;
+ }
+
+ if (SP_IS_FLOWTEXT(text)) {
+ SP_DT_MSGSTACK(desktop)->flash(Inkscape::ERROR_MESSAGE, _("You cannot put flowtext on a path. Convert flowtext to text first."));
return;
}