Make IsCheckable true by default and switch to explicitly disallowing it

Also add a new accessor to wxAuiToolBarItem to make it easier to
determine when a tool can be checked.
This commit is contained in:
Ian McInerney
2020-08-21 23:15:38 +01:00
parent 65e124bb64
commit afbb334a26
10 changed files with 28 additions and 17 deletions

View File

@@ -738,7 +738,9 @@ void wxToolBarBase::UpdateWindowUI(long flags)
wxUpdateUIEvent event(toolid);
event.SetEventObject(this);
event.SetIsCheckable(tool->CanBeToggled());
if ( !tool->CanBeToggled() )
event.DisallowCheck();
if ( evtHandler->ProcessEvent(event) )
{