SPE-1818: Show debug windows only when log level is set at minimal to INFO

This commit is contained in:
Filip Sykala - NTB T15p 2023-07-17 11:12:33 +02:00
parent 7f8b03fd79
commit 9a8f716d80

View File

@ -2858,7 +2858,7 @@ void GLCanvas3D::on_char(wxKeyEvent& evt)
#ifdef SHOW_IMGUI_DEMO_WINDOW #ifdef SHOW_IMGUI_DEMO_WINDOW
static int cur = 0; static int cur = 0;
if (wxString("demo")[cur] == evt.GetUnicodeKey()) ++cur; else cur = 0; if (get_logging_level() >= 3 && wxString("demo")[cur] == evt.GetUnicodeKey()) ++cur; else cur = 0;
if (cur == 4) { show_imgui_demo_window = !show_imgui_demo_window; cur = 0;} if (cur == 4) { show_imgui_demo_window = !show_imgui_demo_window; cur = 0;}
#endif // SHOW_IMGUI_DEMO_WINDOW #endif // SHOW_IMGUI_DEMO_WINDOW
@ -3173,7 +3173,7 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
else { else {
if (!m_gizmos.on_key(evt)) { if (!m_gizmos.on_key(evt)) {
if (evt.GetEventType() == wxEVT_KEY_UP) { if (evt.GetEventType() == wxEVT_KEY_UP) {
if (evt.ShiftDown() && evt.ControlDown() && keyCode == WXK_SPACE) { if (get_logging_level() >= 3 && evt.ShiftDown() && evt.ControlDown() && keyCode == WXK_SPACE) {
wxGetApp().plater()->toggle_render_statistic_dialog(); wxGetApp().plater()->toggle_render_statistic_dialog();
m_dirty = true; m_dirty = true;
} }