]> git.saurik.com Git - wxWidgets.git/commitdiff
Undo/Redo update handlers now set the text as well
authorJulian Smart <julian@anthemion.co.uk>
Thu, 11 Apr 2002 19:43:21 +0000 (19:43 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 11 Apr 2002 19:43:21 +0000 (19:43 +0000)
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

index 1127ffe74038bffe9375a235acf2c7fb98aefad5..2cdab5312d3682c4c446c46d189cd2b4313ad574 100644 (file)
@@ -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)