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:
@@ -932,6 +932,9 @@ void 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
|
||||||
@@ -995,6 +998,9 @@ void 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user