From 71a1f3245adfe0bddb99e1f16787da9b3ca68af5 Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Wed, 25 Mar 2009 10:11:52 +0000 Subject: [PATCH] wxAuiToolbar properly handles items with wxID_ANY (#10173) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index 1abf08a60a..9906eb8997 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -931,6 +931,9 @@ wxAuiToolBarItem* wxAuiToolBar::AddTool(int tool_id, item.min_size = wxDefaultSize; item.user_data = 0; item.sticky = false; + + if (item.id == wxID_ANY) + item.id = wxNewId(); if (!item.disabled_bitmap.IsOk()) { @@ -996,6 +999,9 @@ wxAuiToolBarItem* wxAuiToolBar::AddLabel(int tool_id, item.user_data = 0; item.sticky = false; + if (item.id == wxID_ANY) + item.id = wxNewId(); + m_items.Add(item); return &m_items.Last(); }