diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-09-13 15:10:44 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-09-13 15:10:44 +0000 |
| commit | b5d3bcd190a8b4c95613eeb82e2b768b08b693ce (patch) | |
| tree | e8bf377ac1a28cfadc399bb4d7d603c84b230ba8 /src/live_effects/parameter/originalpatharray.cpp | |
| parent | Improve rendering of vertical text with non-spacing marks in upright orientat... (diff) | |
| download | inkscape-b5d3bcd190a8b4c95613eeb82e2b768b08b693ce.tar.gz inkscape-b5d3bcd190a8b4c95613eeb82e2b768b08b693ce.zip | |
Fixes for clone original LPE
Diffstat (limited to '')
| -rw-r--r-- | src/live_effects/parameter/originalpatharray.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp index 13bd23634..0b1eb4802 100644 --- a/src/live_effects/parameter/originalpatharray.cpp +++ b/src/live_effects/parameter/originalpatharray.cpp @@ -326,28 +326,25 @@ OriginalPathArrayParam::on_link_button_click() if (pathsid.empty()) { return; } + bool foundOne = false; Inkscape::SVGOStringStream os; + for (std::vector<PathAndDirectionAndVisible*>::const_iterator iter = _vector.begin(); iter != _vector.end(); ++iter) { + if (foundOne) { + os << "|"; + } else { + foundOne = true; + } + os << (*iter)->href << "," << ((*iter)->reversed ? "1" : "0") << "," << ((*iter)->visibled ? "1" : "0"); + } for (auto i=pathsid.begin();i!=pathsid.end();++i) { Glib::ustring pathid = *i; // add '#' at start to make it an uri. pathid.insert(pathid.begin(), '#'); - bool foundOne = false; - for (std::vector<PathAndDirectionAndVisible*>::const_iterator iter = _vector.begin(); iter != _vector.end(); ++iter) { - if (foundOne) { - os << "|"; - } else { - foundOne = true; - } - os << (*iter)->href << "," << ((*iter)->reversed ? "1" : "0") << "," << ((*iter)->visibled ? "1" : "0"); - } - + if (foundOne) { os << "|"; } - os << pathid.c_str() << ",0"; - if (*i != *(--pathsid.end())) { - os << "|"; - } + 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, @@ -363,7 +360,7 @@ void OriginalPathArrayParam::unlink(PathAndDirectionAndVisible* to) if (to->href) { g_free(to->href); to->href = NULL; - } + } } void OriginalPathArrayParam::remove_link(PathAndDirectionAndVisible* to) @@ -528,6 +525,14 @@ gchar * OriginalPathArrayParam::param_getSVGValue() const return str; } +void OriginalPathArrayParam::update() +{ + for (std::vector<PathAndDirectionAndVisible*>::iterator iter = _vector.begin(); iter != _vector.end(); ++iter) { + SPObject *linked_obj = (*iter)->ref.getObject(); + linked_modified(linked_obj, SP_OBJECT_MODIFIED_FLAG, *iter); + } +} + } /* namespace LivePathEffect */ } /* namespace Inkscape */ |
