FIX:fix the issue of macOS crashing easily
Change-Id: I7378a28734e46c4126ab0216dc93d45a10bcd451
This commit is contained in:
parent
fce2c9d401
commit
35b0ef0cd7
|
@ -4566,16 +4566,21 @@ void SelectMachineDialog::sys_color_changed()
|
||||||
|
|
||||||
bool SelectMachineDialog::Show(bool show)
|
bool SelectMachineDialog::Show(bool show)
|
||||||
{
|
{
|
||||||
show_status(PrintDialogStatus::PrintStatusInit);
|
|
||||||
|
|
||||||
// set default value when show this dialog
|
// set default value when show this dialog
|
||||||
if (show) {
|
if (show) {
|
||||||
|
m_refresh_timer->Start(LIST_REFRESH_INTERVAL);
|
||||||
|
show_status(PrintDialogStatus::PrintStatusInit);
|
||||||
wxGetApp().UpdateDlgDarkUI(this);
|
wxGetApp().UpdateDlgDarkUI(this);
|
||||||
wxGetApp().reset_to_active();
|
wxGetApp().reset_to_active();
|
||||||
set_default();
|
set_default();
|
||||||
update_user_machine_list();
|
update_user_machine_list();
|
||||||
|
|
||||||
|
Layout();
|
||||||
|
Fit();
|
||||||
|
CenterOnParent();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
m_refresh_timer->Stop();
|
||||||
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
if (dev) {
|
if (dev) {
|
||||||
MachineObject* obj_ = dev->get_selected_machine();
|
MachineObject* obj_ = dev->get_selected_machine();
|
||||||
|
@ -4587,15 +4592,6 @@ bool SelectMachineDialog::Show(bool show)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show) {
|
|
||||||
m_refresh_timer->Start(LIST_REFRESH_INTERVAL);
|
|
||||||
} else {
|
|
||||||
m_refresh_timer->Stop();
|
|
||||||
}
|
|
||||||
Layout();
|
|
||||||
Fit();
|
|
||||||
if (show) { CenterOnParent(); }
|
|
||||||
return DPIDialog::Show(show);
|
return DPIDialog::Show(show);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue