diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp index ae8380d6ac..441210153a 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp @@ -129,8 +129,7 @@ bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow() EDA_3D_CONTROLLER* ctrlTool = m_frame->GetToolManager()->GetTool(); ctrlTool->SetRotationIncrement( m_spinCtrlRotationAngle->GetValue() ); - m_frame->NewDisplay(); - m_canvas->Request_refresh(); + // The 3D scene will be rebuilt by the caller return true; } diff --git a/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp index 68353f3c78..7415860432 100644 --- a/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp @@ -206,18 +206,22 @@ int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent ) switch( flag ) { + // These commands do not request a 3D scene rebuild: case FL_RENDER_OPENGL_SHOW_MODEL_BBOX: case FL_RENDER_RAYTRACING_SHADOWS: case FL_RENDER_RAYTRACING_REFRACTIONS: case FL_RENDER_RAYTRACING_REFLECTIONS: case FL_RENDER_RAYTRACING_ANTI_ALIASING: case FL_AXIS: + case FL_FP_ATTRIBUTES_NORMAL: + case FL_FP_ATTRIBUTES_NORMAL_INSERT: + case FL_FP_ATTRIBUTES_VIRTUAL: m_canvas->Request_refresh(); break; default: { - if( auto* viewer = dynamic_cast( m_toolMgr->GetToolHolder() ) ) + if( auto viewer = dynamic_cast( m_toolMgr->GetToolHolder() ) ) viewer->NewDisplay( true ); else m_canvas->Request_refresh();