Fix floating for resizable auitoolbars

This commit is contained in:
Kvaz1r
2021-06-14 15:06:48 +03:00
parent b52f00492e
commit c452930615

View File

@@ -3010,24 +3010,14 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
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_lastRect.IsEmpty() || m_lastRect.Contains(pt.x, pt.y ))
if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && drop.IsFloatable())
{
m_skipping = true;
drop.Float();
}
else
{
if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && drop.IsFloatable())
{
drop.Float();
}
m_skipping = false;
return ProcessDockResult(target, drop);
drop.Position(pt.x - GetDockPixelOffset(drop) - offset.x);
}
drop.Position(pt.x - GetDockPixelOffset(drop) - offset.x);
return ProcessDockResult(target, drop);
}