diff --git a/src/aui/floatpane.cpp b/src/aui/floatpane.cpp index 952cbfd345..c2c0147106 100644 --- a/src/aui/floatpane.cpp +++ b/src/aui/floatpane.cpp @@ -159,8 +159,10 @@ void wxAuiFloatingFrame::OnSize(wxSizeEvent& event) void wxAuiFloatingFrame::OnClose(wxCloseEvent& evt) { m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt); - if (!evt.GetVeto()) + if (!evt.GetVeto()) { + m_mgr.DetachPane(m_pane_window); Destroy(); + } } void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)