summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/select-tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/tools/select-tool.cpp')
-rw-r--r--src/ui/tools/select-tool.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index 3dfb764bb..2468575c6 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -397,11 +397,13 @@ void SelectTool::sp_select_context_cycle_through_items(Inkscape::Selection *sele
next = std::find( cycling_items.begin(), cycling_items.end(), cycling_cur_item );
g_assert (next != cycling_items.end());
next++;
- if (next == cycling_items.end())
- if ( cycling_wrap )
+ if (next == cycling_items.end()) {
+ if ( cycling_wrap ) {
next = cycling_items.begin();
- else
+ } else {
next--;
+ }
+ }
}
} else {
if (! cycling_cur_item) {