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:
Tim Kosse
2014-07-07 09:33:25 +00:00
parent cf6844b735
commit bf19b89735

View File

@@ -138,7 +138,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
);
if ( GetBool(wxT("disabled")) )
m_toolbar->EnableTool(GetID(), false);
m_toolbar->EnableTool(tool->GetId(), false);
if ( GetBool(wxS("checked")) )
{
@@ -152,7 +152,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
}
else
{
m_toolbar->ToggleTool(GetID(), true);
m_toolbar->ToggleTool(tool->GetId(), true);
}
}