From bf19b897358abe42fe1951c63d01aead3da55100 Mon Sep 17 00:00:00 2001 From: Tim Kosse Date: Mon, 7 Jul 2014 09:33:25 +0000 Subject: [PATCH] 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 --- src/xrc/xh_toolb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index cef30a1906..885a3577ed 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -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); } }