Tools can be specified without name in the XRC, so GetID() of the node returns wxID_ANY. Use the auto-assigned ID of the tool to refer to it instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -138,7 +138,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ( GetBool(wxT("disabled")) )
|
if ( GetBool(wxT("disabled")) )
|
||||||
m_toolbar->EnableTool(GetID(), false);
|
m_toolbar->EnableTool(tool->GetId(), false);
|
||||||
|
|
||||||
if ( GetBool(wxS("checked")) )
|
if ( GetBool(wxS("checked")) )
|
||||||
{
|
{
|
||||||
@@ -152,7 +152,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_toolbar->ToggleTool(GetID(), true);
|
m_toolbar->ToggleTool(tool->GetId(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user