From c7928d82c2c550936339cd126f34b0dc0ab7d6c0 Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Tue, 31 Mar 2009 08:32:16 +0000 Subject: [PATCH] undock/float toolbar if it's dragged right or south of client area git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/framemanager.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index cbf61e6519..76a3081d68 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -3026,7 +3026,8 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks, // toolbars may only be moved in and to fixed-pane docks, // otherwise we will try to float the pane. Also, the pane // should float if being dragged over center pane windows - if (!part->dock->fixed || part->dock->dock_direction == wxAUI_DOCK_CENTER) + if (!part->dock->fixed || part->dock->dock_direction == wxAUI_DOCK_CENTER || + pt.x >= cli_size.x || pt.x <= 0 || pt.y >= cli_size.y || pt.y <= 0) { if (m_last_rect.IsEmpty() || m_last_rect.Contains(pt.x, pt.y )) { @@ -3034,13 +3035,9 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks, } else { - if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && - (drop.IsFloatable() || - (part->dock->dock_direction != wxAUI_DOCK_CENTER && - part->dock->dock_direction != wxAUI_DOCK_NONE))) + if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && drop.IsFloatable()) { - if (drop.IsFloatable()) - drop.Float(); + drop.Float(); } m_skipping = false;