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
This commit is contained in:
Julian Smart
2002-04-11 19:43:21 +00:00
parent 79180098d8
commit 2599ee02f1

View 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)