]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for bug #1747890 - close button problem fixed
authorBenjamin Williams <bwilliams@kirix.com>
Sat, 14 Jul 2007 10:10:25 +0000 (10:10 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Sat, 14 Jul 2007 10:10:25 +0000 (10:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index 00d1d073ff278e77f3983e434abe4224c69004c7..032e467b808406e001886c238ca7bc50a1cbba1c 100644 (file)
@@ -3694,6 +3694,13 @@ void wxAuiNotebook::OnTabButton(wxCommandEvent& command_evt)
     {
         int selection = evt.GetSelection();
 
+        if (selection == -1)
+        {
+            // if the close button is to the right, use the active
+            // page selection to determine which page to close
+            selection = GetSelection();
+        }
+        
         if (selection != -1)
         {
             wxWindow* close_wnd = tabs->GetWindowFromIdx(selection);