fixed bug in ButtonHitTest() which caused invisible buttons to be pressable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1736,7 +1736,9 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y,
|
||||
for (i = 0; i < button_count; ++i)
|
||||
{
|
||||
wxAuiTabContainerButton& button = m_buttons.Item(i);
|
||||
if (button.rect.Contains(x,y))
|
||||
if (button.rect.Contains(x,y) &&
|
||||
!(button.cur_state & (wxAUI_BUTTON_STATE_HIDDEN |
|
||||
wxAUI_BUTTON_STATE_DISABLED)))
|
||||
{
|
||||
if (hit)
|
||||
*hit = &button;
|
||||
@@ -1748,7 +1750,9 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y,
|
||||
for (i = 0; i < button_count; ++i)
|
||||
{
|
||||
wxAuiTabContainerButton& button = m_tab_close_buttons.Item(i);
|
||||
if (button.rect.Contains(x,y))
|
||||
if (button.rect.Contains(x,y) &&
|
||||
!(button.cur_state & (wxAUI_BUTTON_STATE_HIDDEN |
|
||||
wxAUI_BUTTON_STATE_DISABLED)))
|
||||
{
|
||||
if (hit)
|
||||
*hit = &button;
|
||||
|
Reference in New Issue
Block a user