summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/originalpatharray.cpp
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-09-14 09:05:47 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-09-14 09:05:47 +0000
commitbf5a9dd8028a965e4f072ea45a802b4feb6f821a (patch)
treeed5b50a7d7bedb45d38f603b1122854c321da19f /src/live_effects/parameter/originalpatharray.cpp
parentFixes for bug #1716926. Consider backport (diff)
downloadinkscape-bf5a9dd8028a965e4f072ea45a802b4feb6f821a.tar.gz
inkscape-bf5a9dd8028a965e4f072ea45a802b4feb6f821a.zip
Added new LPE parameter to store Items array, also bugfixing in patharray parameter
Diffstat (limited to 'src/live_effects/parameter/originalpatharray.cpp')
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 0b1eb4802..8ac07b98f 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -322,7 +322,8 @@ OriginalPathArrayParam::on_link_button_click()
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
std::vector<Glib::ustring> pathsid = cm->getElementsOfType(SP_ACTIVE_DESKTOP, "svg:path");
-
+ std::vector<Glib::ustring> textsid = cm->getElementsOfType(SP_ACTIVE_DESKTOP, "svg:text");
+ pathsid.insert(pathsid.end(), textsid.begin(), textsid.end());
if (pathsid.empty()) {
return;
}
@@ -343,12 +344,14 @@ OriginalPathArrayParam::on_link_button_click()
if (foundOne) {
os << "|";
+ } else {
+ foundOne = true;
}
os << pathid.c_str() << ",0,1";
}
param_write_to_repr(os.str().c_str());
DocumentUndo::done(param_effect->getSPDoc(), SP_VERB_DIALOG_LIVE_PATH_EFFECT,
- _("Link path parameter to path"));
+ _("Link patharray parameter to path"));
}
void OriginalPathArrayParam::unlink(PathAndDirectionAndVisible* to)
@@ -443,8 +446,7 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/
} else {
curve = SP_SHAPE(linked_obj)->getCurve();
}
- }
- if (SP_IS_TEXT(linked_obj)) {
+ } else if (SP_IS_TEXT(linked_obj)) {
curve = SP_TEXT(linked_obj)->getNormalizedBpath();
}