From d4b8b550f33556f53f662a3d23d0efeb771151d7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 12 Oct 2023 00:30:16 +0100 Subject: [PATCH] Go back to using VIEW::Hide() instead of ForcedTransparency(). (The issue was that the selection VIEW_GROUP drawing ignores the HIDDEN flag so we need to make sure the PCB_GENERATOR_MEANDERS isn't in the selection VIEW_GROUP while we're editing it.) --- pcbnew/generators/pcb_generator_meanders.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pcbnew/generators/pcb_generator_meanders.cpp b/pcbnew/generators/pcb_generator_meanders.cpp index 4882276894..e743e05ca0 100644 --- a/pcbnew/generators/pcb_generator_meanders.cpp +++ b/pcbnew/generators/pcb_generator_meanders.cpp @@ -303,6 +303,11 @@ public: aCommit->Modify( this ); } + // Remove ourselves from the selection so that we don't redraw our existing children as + // part of the selection VIEW_GROUP (which ignores the HIDDEN flags). + PCB_SELECTION_TOOL*selectionTool = aFrame->GetToolManager()->GetTool(); + selectionTool->RemoveItemFromSel( this, true ); + int layer = GetLayer(); PNS::ROUTER* router = aTool->Router(); @@ -659,8 +664,7 @@ public: { if( li->Parent() ) { - li->Parent()->SetForcedTransparency( 1.0 ); - aFrame->GetCanvas()->GetView()->Update( li->Parent() ); + aFrame->GetCanvas()->GetView()->Hide( li->Parent() ); m_removedItems.insert( li->Parent() ); } } @@ -736,7 +740,6 @@ public: for( BOARD_ITEM* item : m_removedItems ) { - item->SetForcedTransparency( 0.0 ); aCommit->Remove( item ); } @@ -765,7 +768,7 @@ public: BOARD_COMMIT* aCommit ) override { for( BOARD_ITEM* item : m_removedItems ) - item->SetForcedTransparency( 0.0 ); + aFrame->GetCanvas()->GetView()->Hide( item, false ); m_removedItems.clear();