3D viewer: fix missing refresh in raytracing mode when changing items visibility.

Fixes #8866
https://gitlab.com/kicad/code/kicad/issues/8866
This commit is contained in:
jean-pierre charras 2021-07-28 15:59:57 +02:00
parent 05a5a2416a
commit dda70622ba
1 changed files with 11 additions and 3 deletions

View File

@ -206,17 +206,25 @@ int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent )
switch( flag )
{
// These commands do not request a 3D scene rebuild:
// These commands do not request a 3D scene rebuild (and do not exist in raytracing):
case FL_RENDER_OPENGL_SHOW_MODEL_BBOX:
case FL_AXIS:
m_canvas->Request_refresh();
break;
// These commands do not request a 3D scene rebuild and exist in raytracing:
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:
if( m_boardAdapter->GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY )
m_canvas->Request_refresh();
else
m_canvas->RenderRaytracingRequest();
break;
default: