From: Julian Smart Date: Thu, 11 Apr 2002 19:43:21 +0000 (+0000) Subject: Undo/Redo update handlers now set the text as well X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2599ee02f150fd8e152db283a17b2d0ba32056f1 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 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 1127ffe740..2cdab5312d 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)