[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sd/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 11 07:14:12 UTC 2020
sd/source/ui/view/drviews1.cxx | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
New commits:
commit 5911eca455d403d66cecd3a21cd2a9233670bbc5
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Tue May 26 10:17:40 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Jun 11 09:13:39 2020 +0200
LOK: slide sorter: update the model on selecting multiple slides
Change-Id: I17bdd8e39c960a81d4bef2a8cffd42103adb5341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94688
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index e41f34a19774..3a370de8b33b 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -758,15 +758,36 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
bool DrawViewShell::SelectPage(sal_uInt16 nPage, sal_uInt16 nSelect)
{
SdPage* pPage = GetDoc()->GetSdPage(nPage, PageKind::Standard);
+
+ //page selector marks pages to selected in view
+ auto &pageSelector = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase())->GetSlideSorter().GetController().GetPageSelector();
+
if (pPage)
{
if (nSelect == 0)
- pPage->SetSelected(false); // Deselect.
+ {
+ GetDoc()->SetSelected(pPage, false); // Deselect.
+ pageSelector.DeselectPage(nPage);
+ }
else if (nSelect == 1)
- pPage->SetSelected(true); // Select.
+ {
+ GetDoc()->SetSelected(pPage, true); // Select.
+ pageSelector.SelectPage(nPage);
+ }
else
- pPage->SetSelected(!pPage->IsSelected()); // Toggle.
-
+ {
+ // Toggle.
+ if (pPage->IsSelected())
+ {
+ GetDoc()->SetSelected(pPage, false);
+ pageSelector.DeselectPage(nPage);
+ }
+ else
+ {
+ GetDoc()->SetSelected(pPage, true);
+ pageSelector.SelectPage(nPage);
+ }
+ }
return true;
}
More information about the Libreoffice-commits
mailing list