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:
@@ -932,6 +932,9 @@ wxAuiToolBarItem* wxAuiToolBar::AddTool(int tool_id,
|
|||||||
item.user_data = 0;
|
item.user_data = 0;
|
||||||
item.sticky = false;
|
item.sticky = false;
|
||||||
|
|
||||||
|
if (item.id == wxID_ANY)
|
||||||
|
item.id = wxNewId();
|
||||||
|
|
||||||
if (!item.disabled_bitmap.IsOk())
|
if (!item.disabled_bitmap.IsOk())
|
||||||
{
|
{
|
||||||
// no disabled bitmap specified, we need to make one
|
// no disabled bitmap specified, we need to make one
|
||||||
@@ -996,6 +999,9 @@ wxAuiToolBarItem* wxAuiToolBar::AddLabel(int tool_id,
|
|||||||
item.user_data = 0;
|
item.user_data = 0;
|
||||||
item.sticky = false;
|
item.sticky = false;
|
||||||
|
|
||||||
|
if (item.id == wxID_ANY)
|
||||||
|
item.id = wxNewId();
|
||||||
|
|
||||||
m_items.Add(item);
|
m_items.Add(item);
|
||||||
return &m_items.Last();
|
return &m_items.Last();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user