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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user