summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/multi-path-manipulator.cpp
diff options
context:
space:
mode:
authorMatthew Petroff <matthew@mpetroff.net>2013-07-02 03:42:25 +0000
committerMatthew Petroff <matthew@mpetroff.net>2013-07-02 03:42:25 +0000
commit70a0fd65c46064941696a5a9366547e1e9d020e2 (patch)
tree1fb73902d467d88b12e978b6de85c0f8f4ca7e9f /src/ui/tool/multi-path-manipulator.cpp
parentPorted "ui/widget/page-sizer.cpp" and "document.cpp" to "Util::Unit" class. (diff)
parentShape calculations. do not quantize the coordinates. (Bug 168158) (diff)
downloadinkscape-70a0fd65c46064941696a5a9366547e1e9d020e2.tar.gz
inkscape-70a0fd65c46064941696a5a9366547e1e9d020e2.zip
Merge from trunk.
(bzr r12380.1.5)
Diffstat (limited to 'src/ui/tool/multi-path-manipulator.cpp')
-rw-r--r--src/ui/tool/multi-path-manipulator.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp
index 70bd0e859..5d5ea2adc 100644
--- a/src/ui/tool/multi-path-manipulator.cpp
+++ b/src/ui/tool/multi-path-manipulator.cpp
@@ -224,10 +224,12 @@ void MultiPathManipulator::shiftSelection(int dir)
SubpathList::iterator last_j;
NodeList::iterator last_k;
bool anything_found = false;
+ bool anynode_found = false;
for (MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) {
SubpathList &sp = i->second->subpathList();
for (SubpathList::iterator j = sp.begin(); j != sp.end(); ++j) {
+ anynode_found = true;
for (NodeList::iterator k = (*j)->begin(); k != (*j)->end(); ++k) {
if (k->selected()) {
last_i = i;
@@ -249,10 +251,12 @@ void MultiPathManipulator::shiftSelection(int dir)
if (!anything_found) {
// select first / last node
// this should never fail because there must be at least 1 non-empty manipulator
- if (dir == 1) {
+ if (anynode_found) {
+ if (dir == 1) {
_selection.insert((*_mmap.begin()->second->subpathList().begin())->begin().ptr());
- } else {
+ } else {
_selection.insert((--(*--(--_mmap.end())->second->subpathList().end())->end()).ptr());
+ }
}
return;
}