diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-09-14 09:05:47 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-09-14 09:05:47 +0000 |
| commit | bf5a9dd8028a965e4f072ea45a802b4feb6f821a (patch) | |
| tree | ed5b50a7d7bedb45d38f603b1122854c321da19f /src/live_effects/parameter/originalpatharray.cpp | |
| parent | Fixes for bug #1716926. Consider backport (diff) | |
| download | inkscape-bf5a9dd8028a965e4f072ea45a802b4feb6f821a.tar.gz inkscape-bf5a9dd8028a965e4f072ea45a802b4feb6f821a.zip | |
Added new LPE parameter to store Items array, also bugfixing in patharray parameter
Diffstat (limited to '')
| -rw-r--r-- | src/live_effects/parameter/originalpatharray.cpp | 10 |
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(); } |
