Apply #12084: Double-clicking disabled left/right scroll buttons in wxAuiNotebook no longer counts as background doubleclick.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2201,7 +2201,7 @@ bool wxAuiTabContainer::TabHitTest(int x, int y, wxWindow** hit) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxAuiTabContainerButton* btn = NULL;
|
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)
|
if (m_buttons.Index(*btn) != wxNOT_FOUND)
|
||||||
return false;
|
return false;
|
||||||
@@ -2239,8 +2239,7 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y,
|
|||||||
{
|
{
|
||||||
wxAuiTabContainerButton& button = m_buttons.Item(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 |
|
!(button.cur_state & wxAUI_BUTTON_STATE_HIDDEN ))
|
||||||
wxAUI_BUTTON_STATE_DISABLED)))
|
|
||||||
{
|
{
|
||||||
if (hit)
|
if (hit)
|
||||||
*hit = &button;
|
*hit = &button;
|
||||||
@@ -2447,7 +2446,8 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt)
|
|||||||
{
|
{
|
||||||
// make sure we're still clicking the button
|
// make sure we're still clicking the button
|
||||||
wxAuiTabContainerButton* button = NULL;
|
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;
|
return;
|
||||||
|
|
||||||
if (button != m_pressed_button)
|
if (button != m_pressed_button)
|
||||||
@@ -2542,7 +2542,7 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt)
|
|||||||
|
|
||||||
// check if the mouse is hovering above a button
|
// check if the mouse is hovering above a button
|
||||||
wxAuiTabContainerButton* 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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user