From 2599ee02f150fd8e152db283a17b2d0ba32056f1 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Apr 2002 19:43:21 +0000 Subject: [PATCH] Undo/Redo update handlers now set the text as well as enabling/disabling, making it possible for several different types of control to share the same menu items and set the text differently. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 1127ffe..2cdab53 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -974,12 +974,16 @@ void wxDocManager::OnUpdateUndo(wxUpdateUIEvent& event) { wxDocument *doc = GetCurrentDocument(); event.Enable( (doc && doc->GetCommandProcessor() && doc->GetCommandProcessor()->CanUndo()) ); + if (doc && doc->GetCommandProcessor()) + doc->GetCommandProcessor()->SetMenuStrings(); } void wxDocManager::OnUpdateRedo(wxUpdateUIEvent& event) { wxDocument *doc = GetCurrentDocument(); event.Enable( (doc && doc->GetCommandProcessor() && doc->GetCommandProcessor()->CanRedo()) ); + if (doc && doc->GetCommandProcessor()) + doc->GetCommandProcessor()->SetMenuStrings(); } void wxDocManager::OnUpdatePrint(wxUpdateUIEvent& event) -- 2.7.4