diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-02-11 12:11:32 +0100 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-02-11 22:15:58 +0100 |
commit | 7ed602a3b8c0ffe922b4f082cd4cdaa5a8f0d64c (patch) | |
tree | 8cacf5e83d514f6cc74add3e0ac621e7bd9872f7 /sd | |
parent | e53ea908b7c791fdcd424cf7b0c8716d3b7b54a0 (diff) |
tdf#130440 only select first page if no other page is selected
Found while implementing the UItest.
See https://gerrit.libreoffice.org/c/core/+/88437
it asserts on line 34 AssertionError: 2 != 1 as the first and
second slides are selected
Change-Id: I249dc0ac6faa55f0f15deedb848beabbc64aeed4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88439
Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx index 381933c234a5..5ac6fddda3f4 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx @@ -126,7 +126,7 @@ void SelectionObserver::EndObservation() 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()) + if (!bSuccess && rSelector.GetPageCount() && rSelector.GetSelectedPageCount() == 0) rSelector.SelectPage(0); } |