Clicking on a disabled arrow shouldn't do anything, in particular it shouldn't
generate a wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK event.
See #12084.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64438
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
return false;
wxAuiTabContainerButton* btn = NULL;
return false;
wxAuiTabContainerButton* btn = NULL;
- if (ButtonHitTest(x, y, &btn))
+ if (ButtonHitTest(x, y, &btn) && !(btn->cur_state & wxAUI_BUTTON_STATE_DISABLED))
{
if (m_buttons.Index(*btn) != wxNOT_FOUND)
return false;
{
if (m_buttons.Index(*btn) != wxNOT_FOUND)
return false;
{
wxAuiTabContainerButton& button = m_buttons.Item(i);
if (button.rect.Contains(x,y) &&
{
wxAuiTabContainerButton& button = m_buttons.Item(i);
if (button.rect.Contains(x,y) &&
- !(button.cur_state & (wxAUI_BUTTON_STATE_HIDDEN |
- wxAUI_BUTTON_STATE_DISABLED)))
+ !(button.cur_state & wxAUI_BUTTON_STATE_HIDDEN ))
{
if (hit)
*hit = &button;
{
if (hit)
*hit = &button;
{
// make sure we're still clicking the button
wxAuiTabContainerButton* button = NULL;
{
// make sure we're still clicking the button
wxAuiTabContainerButton* button = NULL;
- if (!ButtonHitTest(evt.m_x, evt.m_y, &button))
+ if (!ButtonHitTest(evt.m_x, evt.m_y, &button) ||
+ button->cur_state & wxAUI_BUTTON_STATE_DISABLED)
return;
if (button != m_pressed_button)
return;
if (button != m_pressed_button)
// check if the mouse is hovering above a button
wxAuiTabContainerButton* button;
// check if the mouse is hovering above a button
wxAuiTabContainerButton* button;
- if (ButtonHitTest(pos.x, pos.y, &button))
+ if (ButtonHitTest(pos.x, pos.y, &button) && !(button->cur_state & wxAUI_BUTTON_STATE_DISABLED))
{
if (m_hover_button && button != m_hover_button)
{
{
if (m_hover_button && button != m_hover_button)
{