MGR: Save event log state information before OS GUI animation effects get a hold of it.

Attempting to save state in the destructor leads to funky values because the animations have completed and the destructor is called from an idle loop garbage collector.
This commit is contained in:
Rom Walton 2014-01-15 10:31:07 -05:00
parent 112cc6c723
commit 4e2fb97c16
2 changed files with 7 additions and 3 deletions

View File

@ -99,9 +99,6 @@ CDlgEventLog::CDlgEventLog( wxWindow* parent, wxWindowID id, const wxString& cap
CDlgEventLog::~CDlgEventLog() {
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::CDlgEventLog - Destructor Function Begin"));
SaveState();
SetWindowDimensions();
if (m_pMessageInfoAttr) {
delete m_pMessageInfoAttr;
m_pMessageInfoAttr = NULL;
@ -415,6 +412,9 @@ void CDlgEventLog::OnHelp(wxHelpEvent& event) {
*/
void CDlgEventLog::OnOK( wxCommandEvent& WXUNUSED(event) ) {
SaveState();
SetWindowDimensions();
Close();
}
@ -425,6 +425,10 @@ void CDlgEventLog::OnOK( wxCommandEvent& WXUNUSED(event) ) {
void CDlgEventLog::OnClose(wxCloseEvent& WXUNUSED(event)) {
m_bEventLogIsOpen = false; // User specifically closed window
SaveState();
SetWindowDimensions();
Destroy();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 278 KiB