summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2019-07-22 21:28:54 -0800
committerJim Raykowski <raykowj@gmail.com>2019-07-25 00:50:05 +0200
commited882d693f37779e3a09641e7cd43b7a925d2312 (patch)
treeee4de17135965d7e1ec8a6f711fd880b63482496 /svx
parent6131288f2a85d43ba21210e677648c9245793e52 (diff)
tdf#47807 Invalidate bindings to Undo Redo
Change-Id: I71a16e60395003402372202a755b976d37690a27 Reviewed-on: https://gerrit.libreoffice.org/76146 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/sdrundomanager.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/svx/source/svdraw/sdrundomanager.cxx b/svx/source/svdraw/sdrundomanager.cxx
index 78e72e76196a..5d13d8e5e8a8 100644
--- a/svx/source/svdraw/sdrundomanager.cxx
+++ b/svx/source/svdraw/sdrundomanager.cxx
@@ -18,7 +18,10 @@
*/
#include <svx/sdrundomanager.hxx>
+#include <svx/svxids.hrc>
+#include <sfx2/bindings.hxx>
#include <sfx2/objsh.hxx>
+#include <sfx2/viewfrm.hxx>
#include <svl/hint.hxx>
SdrUndoManager::SdrUndoManager()
@@ -146,4 +149,21 @@ void SdrUndoManager::EmptyActionsChanged()
}
}
+void SdrUndoManager::AddUndoAction( std::unique_ptr<SfxUndoAction> pAction, bool bTryMerg )
+{
+ EditUndoManager::AddUndoAction( std::move(pAction), bTryMerg);
+
+ if (m_pDocSh)
+ {
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( m_pDocSh );
+ while ( pViewFrame )
+ {
+ pViewFrame->GetBindings().Invalidate( SID_UNDO );
+ pViewFrame->GetBindings().Invalidate( SID_REDO );
+ pViewFrame = SfxViewFrame::GetNext( *pViewFrame, m_pDocSh );
+ }
+ }
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */