mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 04:08:02 -06:00
Follow-up of d54548367a
-> Reintroduce GLCanvas3D::m_old_size to avoid unneeded calls to render()
This commit is contained in:
parent
ef9004cee4
commit
2bd3e018b1
3 changed files with 25 additions and 1 deletions
|
@ -4527,6 +4527,14 @@ void GLCanvas3D::_resize(unsigned int w, unsigned int h)
|
|||
if (m_canvas == nullptr && m_context == nullptr)
|
||||
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();
|
||||
imgui->set_display_size(static_cast<float>(w), static_cast<float>(h));
|
||||
const float font_size = 1.5f * wxGetApp().em_unit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue