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
This commit is contained in:
parent
d61989a7de
commit
4d83610edf
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user