summaryrefslogtreecommitdiff
path: root/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
index bacf5fdf0323..9eaa7b50c8a2 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -121,16 +121,13 @@ void SelectionObserver::EndObservation()
}
maInsertedPages.clear();
}
- else
- {
- // tdf#129346 nothing currently selected, select something, if possible
- if (rSelector.GetPageCount())
- rSelector.SelectPage(0);
- }
aUpdateLock.Release();
- mrSlideSorter.GetController().GetFocusManager().SetFocusedPageToCurrentPage();
-
+ bool bSuccess = mrSlideSorter.GetController().GetFocusManager().SetFocusedPageToCurrentPage();
+ // tdf#129346 nothing currently selected, select something, if possible
+ // but (tdf#129346) only if setting focus to current page failed
+ if (!bSuccess && rSelector.GetPageCount())
+ rSelector.SelectPage(0);
}
} } } // end of namespace ::sd::slidesorter::controller