From e9c29a4c1f5569d203679e858f91a1230f338fa8 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Tue, 28 Dec 2021 00:48:37 +0100 Subject: [PATCH] 3D Viewer: Only highlight what is under the cursor Fixes https://gitlab.com/kicad/code/kicad/issues/10136 --- 3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp b/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp index 4b3e3ba5f3..dc5b8cb352 100644 --- a/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp +++ b/3d-viewer/3d_rendering/opengl/render_3d_opengl.cpp @@ -1174,8 +1174,11 @@ void RENDER_3D_OPENGL::render3dModelsSelected( bool aRenderTopOrBot, bool aRende if( fp->IsSelected() ) highlight = true; - if( m_boardAdapter.m_Cfg->m_Render.opengl_highlight_on_rollover ) + if( m_boardAdapter.m_Cfg->m_Render.opengl_highlight_on_rollover + && fp == m_currentRollOverItem ) + { highlight = true; + } if( aRenderSelectedOnly != highlight ) continue;