diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2022-07-19 13:57:26 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2022-07-19 14:12:13 +0300 |
commit | 9690919028e3600ccd1ec406ec724b5f63db111a (patch) | |
tree | 51436f6fef1df9d7cd299c0723f2bf4c81db3bfa | |
parent | a965956cba7bd19ef84616c8e0261c16ee6c6f1a (diff) |
Fixed GLGizmoBase::render_input_window() to properly require for an extra frame the first time an imgui window is shown
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoBase.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoBase.cpp b/src/slic3r/GUI/Gizmos/GLGizmoBase.cpp index 393be1a4e..30f303dee 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoBase.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoBase.cpp @@ -225,9 +225,12 @@ void GLGizmoBase::render_input_window(float x, float y, float bottom_limit) { on_render_input_window(x, y, bottom_limit); if (m_first_input_window_render) { - // for some reason, the imgui dialogs are not shown on screen in the 1st frame where they are rendered, but show up only with the 2nd rendered frame - // so, we forces another frame rendering the first time the imgui window is shown + // imgui windows that don't have an initial size needs to be processed once to get one + // and are not rendered in the first frame + // so, we forces to render another frame the first time the imgui window is shown + // https://github.com/ocornut/imgui/issues/2949 m_parent.set_as_dirty(); + m_parent.request_extra_frame(); m_first_input_window_render = false; } } |