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:
@@ -3530,11 +3530,8 @@ void wxAuiManager::OnFloatingPaneClosed(wxWindow* wnd, wxCloseEvent& evt)
|
|||||||
|
|
||||||
void wxAuiManager::OnFloatingPaneActivated(wxWindow* wnd)
|
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);
|
SetActivePane(m_panes, wnd);
|
||||||
Repaint();
|
Repaint();
|
||||||
}
|
}
|
||||||
@@ -3561,8 +3558,8 @@ void wxAuiManager::OnRender(wxAuiManagerEvent& evt)
|
|||||||
{
|
{
|
||||||
wxAuiDockUIPart& part = m_uiparts.Item(i);
|
wxAuiDockUIPart& part = m_uiparts.Item(i);
|
||||||
|
|
||||||
// don't draw hidden pane items
|
// don't draw hidden pane items or items that aren't windows
|
||||||
if (part.sizer_item && !part.sizer_item->IsShown())
|
if (part.sizer_item && ((!part.sizer_item->IsWindow() && !part.sizer_item->IsSpacer() && !part.sizer_item->IsSizer()) || !part.sizer_item->IsShown()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
switch (part.type)
|
switch (part.type)
|
||||||
|
Reference in New Issue
Block a user