diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-05-23 20:48:47 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2017-05-23 20:48:47 +0000 |
| commit | de37ea2c3d4a1c857186dda0b113da04cd2bd79b (patch) | |
| tree | 4b52381825a1d0efcbe4cada1c4bf61ade04b6a1 /src/sp-item.cpp | |
| parent | cmake/MSYS2: Include libyaml for xverb feature (diff) | |
| parent | selection chemistry: cancel if we hit top/bottom (diff) | |
| download | inkscape-de37ea2c3d4a1c857186dda0b113da04cd2bd79b.tar.gz inkscape-de37ea2c3d4a1c857186dda0b113da04cd2bd79b.zip | |
merge chr[] branch : Objects panel improvements, mem leaks.
(bzr r15700)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index e2f678957..368f8896c 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -306,15 +306,17 @@ void SPItem::raiseToTop() { } } -void SPItem::raiseOne() { +bool SPItem::raiseOne() { auto next_higher = std::find_if(++parent->children.iterator_to(*this), parent->children.end(), &is_item); if (next_higher != parent->children.end()) { Inkscape::XML::Node *ref = next_higher->getRepr(); getRepr()->parent()->changeOrder(getRepr(), ref); + return true; } + return false; } -void SPItem::lowerOne() { +bool SPItem::lowerOne() { using Inkscape::Algorithms::find_last_if; auto next_lower = find_last_if(parent->children.begin(), parent->children.iterator_to(*this), &is_item); @@ -325,7 +327,9 @@ void SPItem::lowerOne() { ref = next_lower->getRepr(); } getRepr()->parent()->changeOrder(getRepr(), ref); + return true; } + return false; } void SPItem::lowerToBottom() { |
