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