From 3643ea7b660a1f8263d05ffa9be47e8180fd2504 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 5 May 2016 17:47:03 +0200 Subject: [PATCH] only set cur. page once when removing mult. pages Change-Id: Id9da135a91d9591eed04fb25d2891169c45ecaaf --- .../ui/slidesorter/controller/SlsSelectionManager.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 0768a1e..1e913b3 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -36,6 +36,9 @@ #include "view/SlideSorterView.hxx" #include "view/SlsLayouter.hxx" #include "drawdoc.hxx" +#include "drawview.hxx" +#include "DrawViewShell.hxx" +#include "ViewShellBase.hxx" #include "Window.hxx" #include #include @@ -117,6 +120,13 @@ void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage) else --nNewCurrentSlide; + const auto pViewShell = mrSlideSorter.GetViewShell(); + const auto pDrawViewShell = pViewShell ? dynamic_cast(pViewShell->GetViewShellBase().GetMainViewShell().get()) : nullptr; + const auto pDrawView = pDrawViewShell ? dynamic_cast(pDrawViewShell->GetDrawView()) : nullptr; + + if (pDrawView) + pDrawView->BlockPageOrderChangedHint(true); + // The actual deletion of the selected pages is done in one of two // helper functions. They are specialized for normal respectively for // master pages. @@ -129,6 +139,12 @@ void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage) mrController.HandleModelChange(); aLock.Release(); + if (pDrawView) + { + assert(pDrawViewShell); + pDrawView->BlockPageOrderChangedHint(false); + pDrawViewShell->ResetActualPage(); + } // Show focus and move it to next valid location. if (bIsFocusShowing) -- 2.7.4