mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 00:55:54 +08:00
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
@ -3323,6 +3323,8 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
|
|||||||
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(name()), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
: DPIDialog(parent, wxID_ANY, wxString(SLIC3R_APP_NAME) + " - " + _(name()), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
, p(new priv(this))
|
, p(new priv(this))
|
||||||
{
|
{
|
||||||
|
wxBusyCursor wait;
|
||||||
|
|
||||||
this->SetFont(wxGetApp().normal_font());
|
this->SetFont(wxGetApp().normal_font());
|
||||||
|
|
||||||
p->load_vendors();
|
p->load_vendors();
|
||||||
|
@ -3057,6 +3057,13 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
|
|||||||
auto wizard = new ConfigWizard(mainframe);
|
auto wizard = new ConfigWizard(mainframe);
|
||||||
const bool res = wizard->run(reason, start_page);
|
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) {
|
if (res) {
|
||||||
load_current_presets();
|
load_current_presets();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user