mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
wxEVT_CREATE and wxEVT_ACTIVATE is not being called on the main frame
on application start-up, at least not on Windows. wxEVT_CREATE was called for some control deep in the Plater, however the event was delivered to the main frame and only for slicer, not for G-code viewer. Thus the callbacks for 3D Mouse were not registered for and the 3D mouse did not work on Windows. Fixed by calling the callback registration from the first execution of the Idle function.
This commit is contained in:
parent
d7686d7e6a
commit
e0c5309bc3
6 changed files with 71 additions and 66 deletions
|
@ -533,7 +533,7 @@ static void generic_exception_handle()
|
|||
}
|
||||
}
|
||||
|
||||
void GUI_App::AFTER_INIT_LOADS::on_loads(GUI_App* gui)
|
||||
void GUI_App::AfterInitLoads::on_loads(GUI_App* gui)
|
||||
{
|
||||
if (!gui->initialized())
|
||||
return;
|
||||
|
@ -847,7 +847,10 @@ bool GUI_App::on_init_inner()
|
|||
static bool update_gui_after_init = true;
|
||||
if (update_gui_after_init) {
|
||||
update_gui_after_init = false;
|
||||
m_after_init_loads.on_loads(this);
|
||||
#ifdef WIN32
|
||||
this->mainframe->register_win32_callbacks();
|
||||
#endif
|
||||
this->after_init_loads.on_loads(this);
|
||||
}
|
||||
|
||||
// Preset updating & Configwizard are done after the above initializations,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue