[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sd/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 16 11:16:57 UTC 2019
sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 63c5b6114b9a29dc691818f96b0f695ceaa2c693
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Dec 13 12:47:54 2019 +0000
Commit: Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Dec 16 12:16:19 2019 +0100
Resolves: tdf#129346 if nothing currently selected, select something
in the slidesorter
Change-Id: I66853ba56eab93dfb18de7496212eb64e97cd2bf
Reviewed-on: https://gerrit.libreoffice.org/85131
Tested-by: Jenkins
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
index d6daf3dd0826..29bc46c71789 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -116,7 +116,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)
@@ -125,6 +125,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();
More information about the Libreoffice-commits
mailing list