mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 07:32:39 -07:00
A part of code related to loads after App::OnInit() call is moved from PrusaSlicer.cpp to GUI_App.cpp
Splash Screen under OSX requires a call of wxYeild() for update. But wxYield() furthers a case, when CallAfter() in CLI::run() was called at the wrong time, before some of the GUI was created. So, there is workaround: Parameters needed for later loads are encapsulated to GUI_App::AFTER_INIT_LOADS structure and are used in GUI_App::AFTER_INIT_LOADS::on_loads which is called just ones after wxEVT_IDLE
This commit is contained in:
@@ -577,6 +577,12 @@ int CLI::run(int argc, char **argv)
|
||||
|
||||
// gui->autosave = m_config.opt_string("autosave");
|
||||
GUI::GUI_App::SetInstance(gui);
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
gui->m_after_init_loads.set_params(load_configs, m_extra_config, m_input_files, start_as_gcodeviewer);
|
||||
#else
|
||||
gui->m_after_init_loads.set_params(load_configs, m_extra_config, m_input_files);
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
/*
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
gui->CallAfter([gui, this, &load_configs, start_as_gcodeviewer] {
|
||||
#else
|
||||
@@ -614,6 +620,7 @@ int CLI::run(int argc, char **argv)
|
||||
}
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
});
|
||||
*/
|
||||
int result = wxEntry(argc, argv);
|
||||
return result;
|
||||
#else /* SLIC3R_GUI */
|
||||
|
||||
Reference in New Issue
Block a user