mirror of https://github.com/BOINC/boinc.git
Merge pull request #4785 from AenBleidd/vko_4783_fix_crash
[Manager] Create proper sizing on SimpleView
This commit is contained in:
commit
82b3c45bff
|
@ -118,6 +118,9 @@ CSimpleFrame::CSimpleFrame(wxString title, wxIconBundle* icons, wxPoint position
|
||||||
CreateMenus();
|
CreateMenus();
|
||||||
dlgMsgsPtr = NULL;
|
dlgMsgsPtr = NULL;
|
||||||
m_pBackgroundPanel = new CSimpleGUIPanel(this);
|
m_pBackgroundPanel = new CSimpleGUIPanel(this);
|
||||||
|
mainSizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
mainSizer->Add(m_pBackgroundPanel, 1, wxLEFT | wxRIGHT | wxEXPAND, 0);
|
||||||
|
SetSizerAndFit(mainSizer);
|
||||||
RestoreState();
|
RestoreState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1006,7 +1009,6 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) :
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
SetSizerAndFit(mainSizer);
|
SetSizerAndFit(mainSizer);
|
||||||
parent->SetSizerAndFit(mainSizer);
|
|
||||||
|
|
||||||
SetBackgroundBitmap();
|
SetBackgroundBitmap();
|
||||||
|
|
||||||
|
@ -1034,8 +1036,6 @@ CSimpleGUIPanel::~CSimpleGUIPanel()
|
||||||
delete checkForNewNoticesTimer;
|
delete checkForNewNoticesTimer;
|
||||||
m_bmpBg = wxNullBitmap; // Deletes old bitmap via reference counting
|
m_bmpBg = wxNullBitmap; // Deletes old bitmap via reference counting
|
||||||
|
|
||||||
GetParent()->SetSizer(NULL, false); // Avoid trying to delete mainSizer twice
|
|
||||||
|
|
||||||
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleGUIPanel::CSimpleGUIPanel - Destructor Function End"));
|
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleGUIPanel::CSimpleGUIPanel - Destructor Function End"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CDlgMessages* dlgMsgsPtr;
|
CDlgMessages* dlgMsgsPtr;
|
||||||
|
wxBoxSizer* mainSizer;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue