Fix of compilation on OSX and Linux, update of camera after 3D mouse
disconnect moved to the main thread.
This commit is contained in:
parent
9b26f8a18b
commit
98fc01afe7
2 changed files with 17 additions and 7 deletions
|
@ -407,9 +407,13 @@ void Mouse3DController::disconnected()
|
||||||
m_params_by_device[m_device_str] = m_params_ui;
|
m_params_by_device[m_device_str] = m_params_ui;
|
||||||
m_device_str.clear();
|
m_device_str.clear();
|
||||||
m_connected = false;
|
m_connected = false;
|
||||||
wxGetApp().plater()->get_camera().recover_from_free_camera();
|
wxGetApp().plater()->CallAfter([]() {
|
||||||
wxGetApp().plater()->set_current_canvas_as_dirty();
|
Plater *plater = wxGetApp().plater();
|
||||||
wxWakeUpIdle();
|
if (plater != nullptr) {
|
||||||
|
plater->get_camera().recover_from_free_camera();
|
||||||
|
plater->set_current_canvas_as_dirty();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -822,10 +826,14 @@ void Mouse3DController::disconnect_device()
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Enumerate once immediately after disconnect.
|
// Enumerate once immediately after disconnect.
|
||||||
m_wakeup = true;
|
m_wakeup = true;
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
wxGetApp().plater()->get_camera().recover_from_free_camera();
|
wxGetApp().plater()->CallAfter([]() {
|
||||||
wxGetApp().plater()->set_current_canvas_as_dirty();
|
Plater *plater = wxGetApp().plater();
|
||||||
wxWakeUpIdle();
|
if (plater != nullptr) {
|
||||||
|
plater->get_camera().recover_from_free_camera();
|
||||||
|
plater->set_current_canvas_as_dirty();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -440,7 +440,9 @@ void RemovableDriveManager::update()
|
||||||
void RemovableDriveManager::thread_proc()
|
void RemovableDriveManager::thread_proc()
|
||||||
{
|
{
|
||||||
// Signal the worker thread to update initially.
|
// Signal the worker thread to update initially.
|
||||||
|
#ifdef _WIN32
|
||||||
m_wakeup = true;
|
m_wakeup = true;
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// Wait for 2 seconds before running the disk enumeration.
|
// Wait for 2 seconds before running the disk enumeration.
|
||||||
|
|
Loading…
Reference in a new issue