mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -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
|
@ -3437,8 +3437,12 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
|||
|
||||
// sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably)
|
||||
view3D->set_as_dirty();
|
||||
#if ENABLE_SCROLLABLE_LEGEND
|
||||
// reset cached size to force a resize on next call to render() to keep imgui in synch with canvas size
|
||||
view3D->get_canvas3d()->reset_old_size();
|
||||
#endif // ENABLE_SCROLLABLE_LEGEND
|
||||
view_toolbar.select_item("3D");
|
||||
if(notification_manager != nullptr)
|
||||
if (notification_manager != nullptr)
|
||||
notification_manager->set_in_preview(false);
|
||||
}
|
||||
else if (current_panel == preview) {
|
||||
|
@ -3457,6 +3461,10 @@ void Plater::priv::set_current_panel(wxPanel* panel)
|
|||
preview->reload_print(true);
|
||||
|
||||
preview->set_as_dirty();
|
||||
#if ENABLE_SCROLLABLE_LEGEND
|
||||
// reset cached size to force a resize on next call to render() to keep imgui in synch with canvas size
|
||||
preview->get_canvas3d()->reset_old_size();
|
||||
#endif // ENABLE_SCROLLABLE_LEGEND
|
||||
view_toolbar.select_item("Preview");
|
||||
if (notification_manager != nullptr)
|
||||
notification_manager->set_in_preview(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue