Kaydet (Commit) a05fe3a8 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#100950 only update page selection if pages changed

Change-Id: Ibe1c37c0b44bc1925df4810039fca874fb6c8e93
Reviewed-on: https://gerrit.libreoffice.org/45031Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d9d8ee98
......@@ -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();
......
......@@ -66,6 +66,7 @@ public:
private:
SlideSorter& mrSlideSorter;
bool mbIsOvservationActive;
bool mbPageEventOccurred;
::std::vector<const SdPage*> maInsertedPages;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment