GUI_App::run_wizard : Deallocate a memory after close ConfigWizard.
+ Added wait cursor when ConfigWizard is created to inform user about activity
This commit is contained in:
parent
52fc7a8439
commit
683933176b
2 changed files with 9 additions and 0 deletions
|
@ -3323,6 +3323,8 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
|
|||
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(name()), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
, p(new priv(this))
|
||||
{
|
||||
wxBusyCursor wait;
|
||||
|
||||
this->SetFont(wxGetApp().normal_font());
|
||||
|
||||
p->load_vendors();
|
||||
|
|
|
@ -3057,6 +3057,13 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
|||
auto wizard = new ConfigWizard(mainframe);
|
||||
const bool res = wizard->run(reason, start_page);
|
||||
|
||||
// !!! Deallocate memory after close ConfigWizard.
|
||||
// Note, that mainframe is a parent of ConfigWizard.
|
||||
// So, wizard will be destroyed only during destroying of mainframe
|
||||
// To avoid this state the wizard have to be disconnected from mainframe and Destroyed explicitly
|
||||
mainframe->RemoveChild(wizard);
|
||||
wizard->Destroy();
|
||||
|
||||
if (res) {
|
||||
load_current_presets();
|
||||
|
||||
|
|
Loading…
Reference in a new issue