mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 04:08:02 -06:00
Fixed imgui out of synch with mouse after switching between preview and 3D view
This commit is contained in:
parent
044634d7d1
commit
d54548367a
2 changed files with 0 additions and 12 deletions
|
@ -4527,14 +4527,6 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h)
|
||||||
if (m_canvas == nullptr && m_context == nullptr)
|
if (m_canvas == nullptr && m_context == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if ENABLE_SCROLLABLE_LEGEND
|
|
||||||
const std::array<unsigned int, 2> new_size = { w, h };
|
|
||||||
if (m_old_size == new_size)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_old_size = new_size;
|
|
||||||
#endif // ENABLE_SCROLLABLE_LEGEND
|
|
||||||
|
|
||||||
auto *imgui = wxGetApp().imgui();
|
auto *imgui = wxGetApp().imgui();
|
||||||
imgui->set_display_size(static_cast<float>(w), static_cast<float>(h));
|
imgui->set_display_size(static_cast<float>(w), static_cast<float>(h));
|
||||||
const float font_size = 1.5f * wxGetApp().em_unit();
|
const float font_size = 1.5f * wxGetApp().em_unit();
|
||||||
|
|
|
@ -425,10 +425,6 @@ private:
|
||||||
Model* m_model;
|
Model* m_model;
|
||||||
BackgroundSlicingProcess *m_process;
|
BackgroundSlicingProcess *m_process;
|
||||||
|
|
||||||
#if ENABLE_SCROLLABLE_LEGEND
|
|
||||||
std::array<unsigned int, 2> m_old_size{ 0, 0 };
|
|
||||||
#endif // ENABLE_SCROLLABLE_LEGEND
|
|
||||||
|
|
||||||
// Screen is only refreshed from the OnIdle handler if it is dirty.
|
// Screen is only refreshed from the OnIdle handler if it is dirty.
|
||||||
bool m_dirty;
|
bool m_dirty;
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue