diff options
author | David Tardon <dtardon@redhat.com> | 2016-05-05 17:47:03 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-05-05 18:54:33 +0200 |
commit | fd99dc83659b8c9e4dff9c55ed43c936f9a5b7fd (patch) | |
tree | 4eb1d038d1ce539d0b9af6f573c80ec02aa8d5cb | |
parent | remove superfluous check (diff) | |
download | core-fd99dc83659b8c9e4dff9c55ed43c936f9a5b7fd.tar.gz core-fd99dc83659b8c9e4dff9c55ed43c936f9a5b7fd.zip |
only set cur. page once when removing mult. pages
Change-Id: Id9da135a91d9591eed04fb25d2891169c45ecaaf
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index a954aed91d6c..c861fbfc919c 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 <svx/svxids.hrc> #include <com/sun/star/drawing/XMasterPagesSupplier.hpp> @@ -108,6 +111,13 @@ void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage) else --nNewCurrentSlide; + const auto pViewShell = mrSlideSorter.GetViewShell(); + const auto pDrawViewShell = pViewShell ? std::dynamic_pointer_cast<sd::DrawViewShell>(pViewShell->GetViewShellBase().GetMainViewShell()) : nullptr; + const auto pDrawView = pDrawViewShell ? dynamic_cast<sd::DrawView*>(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. @@ -120,6 +130,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) |