From 4d83610edfa102f6e170719eeef5ad2c73622570 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 21 Aug 2007 09:18:44 +0000 Subject: [PATCH] Applied patch [ 1678412 ] handling non-existent panes and uninitialized sizers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/framemanager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 6fc592552e..19315ef73a 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -3530,11 +3530,8 @@ void wxAuiManager::OnFloatingPaneClosed(wxWindow* wnd, wxCloseEvent& evt) void wxAuiManager::OnFloatingPaneActivated(wxWindow* wnd) { - if (GetFlags() & wxAUI_MGR_ALLOW_ACTIVE_PANE) + if ((GetFlags() & wxAUI_MGR_ALLOW_ACTIVE_PANE) && GetPane(wnd).IsOk()) { - // try to find the pane - wxASSERT_MSG(GetPane(wnd).IsOk(), wxT("Pane window not found")); - SetActivePane(m_panes, wnd); Repaint(); } @@ -3561,8 +3558,8 @@ void wxAuiManager::OnRender(wxAuiManagerEvent& evt) { wxAuiDockUIPart& part = m_uiparts.Item(i); - // don't draw hidden pane items - if (part.sizer_item && !part.sizer_item->IsShown()) + // don't draw hidden pane items or items that aren't windows + if (part.sizer_item && ((!part.sizer_item->IsWindow() && !part.sizer_item->IsSpacer() && !part.sizer_item->IsSizer()) || !part.sizer_item->IsShown())) continue; switch (part.type)