diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-13 12:47:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-13 14:35:29 +0100 |
commit | 13dfaa3c3704a5a963f9e1e5d45796472f43c80e (patch) | |
tree | 4b34fb8828934c21752f6e97537e18602dc9f4dc /sd | |
parent | dcd3b5a52b343aa82933ba27be3396f46ee465ee (diff) |
Resolves: tdf#129346 if nothing currently selected, select something
in the slidesorter
Change-Id: I66853ba56eab93dfb18de7496212eb64e97cd2bf
Reviewed-on: https://gerrit.libreoffice.org/85108
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index 0d4b23ff8dfe..bacf5fdf0323 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -112,7 +112,7 @@ void SelectionObserver::EndObservation() PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); PageSelector::UpdateLock aUpdateLock (mrSlideSorter); rSelector.DeselectAllPages(); - if ( ! maInsertedPages.empty()) + if (!maInsertedPages.empty()) { // Select the inserted pages. for (const auto& rpPage : maInsertedPages) @@ -121,6 +121,12 @@ 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(); |