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:
parent
6b9ce6ca32
commit
71a1f3245a
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user