]> git.saurik.com Git - wxWidgets.git/commitdiff
button bug fixed
authorBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 20:02:38 +0000 (20:02 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 20:02:38 +0000 (20:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/aui/auibook.h
src/aui/auibook.cpp

index 0dd02f4644f85e654300b5ee8aff1757189110bb..7bfabe35e1fca2009200c650fa994884749f98a7 100644 (file)
@@ -180,7 +180,7 @@ public:
 
     int GetBestTabCtrlSize(wxWindow* wnd);    
 
-private:
+protected:
 
     wxFont m_normal_font;
     wxFont m_selected_font;
@@ -263,7 +263,7 @@ public:
 
     int GetBestTabCtrlSize(wxWindow* wnd);    
 
-private:
+protected:
 
     wxFont m_normal_font;
     wxFont m_selected_font;
index 0bff20b468e59ec353fc4c88a00f1b090f52a666..d97bd4daae70e5c6ad8861a69f570a276e84fd52 100644 (file)
@@ -1863,9 +1863,13 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt)
     m_is_dragging = false;
     m_click_tab = NULL;
 
+
     wxWindow* wnd;
     if (TabHitTest(evt.m_x, evt.m_y, &wnd))
     {
+        if (m_flags & wxAUI_NB_CLOSE_ON_ACTIVE_TAB)
+            m_hover_button = NULL;
+        
         wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId);
         e.SetSelection(GetIdxFromWindow(wnd));
         e.SetOldSelection(GetActivePage());
@@ -1876,7 +1880,7 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt)
         m_click_pt.y = evt.m_y;
         m_click_tab = wnd;
     }
-
+    
     if (m_hover_button)
     {
         m_hover_button->cur_state = wxAUI_BUTTON_STATE_PRESSED;