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
This commit is contained in:
Benjamin Williams 2009-03-25 10:11:52 +00:00
parent 6b9ce6ca32
commit 71a1f3245a

View File

@ -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();
}