From d54548367a946f4c1c388a91fca61f1589533fa2 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 13 May 2021 10:59:13 +0200 Subject: [PATCH] Fixed imgui out of synch with mouse after switching between preview and 3D view --- src/slic3r/GUI/GLCanvas3D.cpp | 8 -------- src/slic3r/GUI/GLCanvas3D.hpp | 4 ---- 2 files changed, 12 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 3829ab0d15..ea3bec1311 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4527,14 +4527,6 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h) if (m_canvas == nullptr && m_context == nullptr) return; -#if ENABLE_SCROLLABLE_LEGEND - const std::array new_size = { w, h }; - if (m_old_size == new_size) - return; - - m_old_size = new_size; -#endif // ENABLE_SCROLLABLE_LEGEND - auto *imgui = wxGetApp().imgui(); imgui->set_display_size(static_cast(w), static_cast(h)); const float font_size = 1.5f * wxGetApp().em_unit(); diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp index 46de9b12e3..a5c010d959 100644 --- a/src/slic3r/GUI/GLCanvas3D.hpp +++ b/src/slic3r/GUI/GLCanvas3D.hpp @@ -425,10 +425,6 @@ private: Model* m_model; BackgroundSlicingProcess *m_process; -#if ENABLE_SCROLLABLE_LEGEND - std::array m_old_size{ 0, 0 }; -#endif // ENABLE_SCROLLABLE_LEGEND - // Screen is only refreshed from the OnIdle handler if it is dirty. bool m_dirty; bool m_initialized;