undock/float toolbar if it's dragged right or south of client area

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@59960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2009-03-31 09:11:19 +00:00
parent f399f6b686
commit 9d68bed54b

View File

@@ -2877,7 +2877,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 ))
{
@@ -2885,13 +2886,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;