Lazily initialize m_main_config_dialog (Issue #10213)
This commit is contained in:
parent
feefe15485
commit
01e07d7853
|
@ -321,8 +321,6 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo
|
||||||
{
|
{
|
||||||
BindEvents();
|
BindEvents();
|
||||||
|
|
||||||
m_main_config_dialog = new CConfigMain(this);
|
|
||||||
|
|
||||||
for (int i = 0; i <= IDM_CODE_WINDOW - IDM_LOG_WINDOW; i++)
|
for (int i = 0; i <= IDM_CODE_WINDOW - IDM_LOG_WINDOW; i++)
|
||||||
bFloatWindow[i] = false;
|
bFloatWindow[i] = false;
|
||||||
|
|
||||||
|
|
|
@ -259,6 +259,8 @@ wxToolBar* CFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& na
|
||||||
|
|
||||||
void CFrame::OpenGeneralConfiguration(wxWindowID tab_id)
|
void CFrame::OpenGeneralConfiguration(wxWindowID tab_id)
|
||||||
{
|
{
|
||||||
|
if (!m_main_config_dialog)
|
||||||
|
m_main_config_dialog = new CConfigMain(this);
|
||||||
if (tab_id > wxID_ANY)
|
if (tab_id > wxID_ANY)
|
||||||
m_main_config_dialog->SetSelectedTab(tab_id);
|
m_main_config_dialog->SetSelectedTab(tab_id);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue