Fix AUI floating position mismatch
Ensure that the owner idea of the floating frame position always matches reality -- which could be not the case before if we returned before updating it. This commit is best viewed with git --color-moved --color-moved-ws=ignore-all-space options. Closes #22458.
This commit is contained in:
parent
029b99e9d7
commit
e777a82bfd
@ -203,6 +203,13 @@ void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt)
|
||||
|
||||
void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||
{
|
||||
// Always sync pane's floating_pos with frame's position
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_ownerMgr->GetPane(m_paneWindow).
|
||||
floating_pos = event.GetPosition();
|
||||
}
|
||||
|
||||
if (!m_solidDrag)
|
||||
{
|
||||
// systems without solid window dragging need to be
|
||||
@ -242,14 +249,6 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
|
||||
m_last2Rect = m_lastRect;
|
||||
m_lastRect = winRect;
|
||||
|
||||
// However still update the internally stored position to avoid
|
||||
// snapping back to the old one later.
|
||||
if (m_ownerMgr)
|
||||
{
|
||||
m_ownerMgr->GetPane(m_paneWindow).
|
||||
floating_pos = winRect.GetPosition();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user