From 988a90d5ee1de55b8f24be6f1c7c2e304f8a9e5b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 18 Aug 2023 12:34:59 +0100 Subject: [PATCH] Ignore LOD scale for selections, but not things explicitly hidden. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215 --- common/view/view_group.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index dd0b2666ac..c47ede0e07 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -111,6 +112,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const bool isSelection = m_layer == LAYER_SELECT_OVERLAY; const std::vector drawList = updateDrawList(); + constexpr double HIDE = std::numeric_limits::max(); std::map> layer_item_map; @@ -170,6 +172,11 @@ void VIEW_GROUP::ViewDraw( int aLayer, VIEW* aView ) const for( VIEW_ITEM* item : layer_item_map[ layers[i] ] ) { + // Ignore LOD scale for selected items, but don't ignore things explicitly + // hidden. + if( item->ViewGetLOD( layer, aView ) == HIDE ) + continue; + if( !painter->Draw( item, layers[i] ) ) item->ViewDraw( layers[i], aView ); // Alternative drawing method }