sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx     |   12 
+++++++---
 sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx |    1 
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit a05fe3a8cfd4ec420eb6969d98f64e4308f14230
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Nov 21 12:38:21 2017 +0000

    Resolves: tdf#100950 only update page selection if pages changed
    
    Change-Id: Ibe1c37c0b44bc1925df4810039fca874fb6c8e93
    Reviewed-on: https://gerrit.libreoffice.org/45031
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx 
b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
index 76f7638b2275..f21817486544 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -56,9 +56,10 @@ void SelectionObserver::Context::Abort()
 //===== SelectionObserver =====================================================
 
 SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter)
-    : mrSlideSorter(rSlideSorter),
-      mbIsOvservationActive(false),
-      maInsertedPages()
+    : mrSlideSorter(rSlideSorter)
+    , mbIsOvservationActive(false)
+    , mbPageEventOccurred(false)
+    , maInsertedPages()
 {
 }
 
@@ -71,6 +72,8 @@ void SelectionObserver::NotifyPageEvent (const SdrPage* 
pSdrPage)
     if ( ! mbIsOvservationActive)
         return;
 
+    mbPageEventOccurred = true;
+
     const SdPage* pPage = dynamic_cast<const SdPage*>(pSdrPage);
     if (pPage == nullptr)
         return;
@@ -106,6 +109,9 @@ void SelectionObserver::EndObservation()
     OSL_ASSERT(mbIsOvservationActive);
     mbIsOvservationActive = false;
 
+    if (!mbPageEventOccurred)
+        return;
+
     PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
     PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
     rSelector.DeselectAllPages();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
index f0dad8bb2b07..1daf3593db6c 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
@@ -66,6 +66,7 @@ public:
 private:
     SlideSorter& mrSlideSorter;
     bool mbIsOvservationActive;
+    bool mbPageEventOccurred;
 
     ::std::vector<const SdPage*> maInsertedPages;
 };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to