summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/select-tool.cpp
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2016-02-22 19:49:03 +0000
committerKris De Gussem <Kris.De.Gussem@hotmail.com>2016-02-22 19:49:03 +0000
commite16f1a053c67a8c42172f5186f247f11c3b6e777 (patch)
treebfd9a3b5794ad3a3002a41eb41ab84e7acd840f6 /src/ui/tools/select-tool.cpp
parentApply from patch from houz (Fixes color profile name mangling) (diff)
downloadinkscape-e16f1a053c67a8c42172f5186f247f11c3b6e777.tar.gz
inkscape-e16f1a053c67a8c42172f5186f247f11c3b6e777.zip
static code analysis
(bzr r14664)
Diffstat (limited to 'src/ui/tools/select-tool.cpp')
-rw-r--r--src/ui/tools/select-tool.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index 2b85216d2..905e38f2b 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -405,13 +405,15 @@ void SelectTool::sp_select_context_cycle_through_items(Inkscape::Selection *sele
// Find next item and activate it
std::vector<SPItem *>::iterator next = this->cycling_cur_item;
if (scroll_event->direction == GDK_SCROLL_UP) {
- next++;
- if (next == this->cycling_items.end() && this->cycling_wrap)
+ ++next;
+ if (next == this->cycling_items.end() && this->cycling_wrap) {
next = this->cycling_items.begin();
+ }
} else {
- if(next == this->cycling_items.begin())
+ if(next == this->cycling_items.begin()) {
next = this->cycling_items.end();
- next--;
+ }
+ --next;
}
if (next!=this->cycling_items.end()) {