FIX: mac printer & filament guideframe crash

Jira: STUDIO-14240 STUDIO-14238
Change-Id: Iaec55a36b09ee0c501c374efc985e369b54ba555
(cherry picked from commit 1de29784003d25bd962dff9b3da770edab444da6)
This commit is contained in:
weiting.ji
2025-08-28 17:50:58 +08:00
committed by Noisyfox
parent 2d69a71b15
commit f1f6758411

View File

@@ -6818,6 +6818,21 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage
{
wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
#ifdef __APPLE__
if (is_adding_script_handler()) {
BOOST_LOG_TRIVIAL(info) << "run_wizard: Script handler is being added, delaying wizard creation";
auto timer = new wxTimer();
timer->Bind(wxEVT_TIMER, [this, reason, start_page, timer](wxTimerEvent &) {
timer->Stop();
run_wizard(reason, start_page);
delete timer;
});
timer->StartOnce(200);
return true;
}
#endif
//if (reason == ConfigWizard::RR_USER) {
// //TODO: turn off it currently, maybe need to turn on in the future
// if (preset_updater->config_update(app_config->orig_version(), PresetUpdater::UpdateParams::FORCED_BEFORE_WIZARD) == PresetUpdater::R_ALL_CANCELED)