]> git.saurik.com Git - wxWidgets.git/commitdiff
docking hint bug fix
authorBenjamin Williams <bwilliams@kirix.com>
Mon, 6 Nov 2006 17:12:49 +0000 (17:12 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Mon, 6 Nov 2006 17:12:49 +0000 (17:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index 82d4a4717c67d8b2ebc989333d48529b2d061260..90377a258b46966890a8774a688f65ad50f367f8 100644 (file)
@@ -2179,29 +2179,29 @@ void wxAuiNotebook::OnTabDragMotion(wxCommandEvent& evt)
     {
         wxWindow* tab_ctrl = ::wxFindWindowAtPoint(screen_pt);
         
-        // if we are over a hint window, leave
-        if (tab_ctrl->IsKindOf(CLASSINFO(wxFrame)))
-            return;
-        
-        while (tab_ctrl)
+        // make sure we are not over the hint window
+        if (!tab_ctrl->IsKindOf(CLASSINFO(wxFrame)))
         {
-            if (tab_ctrl->IsKindOf(CLASSINFO(wxAuiTabCtrl)))
-                break;
-            tab_ctrl = tab_ctrl->GetParent();
-        }
-        
-        if (tab_ctrl)
-        {
-            wxAuiNotebook* nb = (wxAuiNotebook*)tab_ctrl->GetParent();
-            
-            if (nb != this)
+            while (tab_ctrl)
             {
-                wxRect hint_rect = tab_ctrl->GetRect();
-                tab_ctrl->ClientToScreen(&hint_rect.x, &hint_rect.y);
-                m_mgr.ShowHint(hint_rect);
-                return;
+                if (tab_ctrl->IsKindOf(CLASSINFO(wxAuiTabCtrl)))
+                    break;
+                tab_ctrl = tab_ctrl->GetParent();
             }
             
+            if (tab_ctrl)
+            {
+                wxAuiNotebook* nb = (wxAuiNotebook*)tab_ctrl->GetParent();
+                
+                if (nb != this)
+                {
+                    wxRect hint_rect = tab_ctrl->GetRect();
+                    tab_ctrl->ClientToScreen(&hint_rect.x, &hint_rect.y);
+                    m_mgr.ShowHint(hint_rect);
+                    return;
+                }
+                
+            }
         }
     }