wxAuiToolbar properly handles items with wxID_ANY (#10173)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -931,6 +931,9 @@ void 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())
|
||||
{
|
||||
@@ -995,6 +998,9 @@ void wxAuiToolBar::AddLabel(int tool_id,
|
||||
item.user_data = 0;
|
||||
item.sticky = false;
|
||||
|
||||
if (item.id == wxID_ANY)
|
||||
item.id = wxNewId();
|
||||
|
||||
m_items.Add(item);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user