Browse Source

Do not refresh PCB canvas when clearing every selected item.

It only needs to be done once after all of the items are updated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21332
9.0
Wayne Stambaugh 3 months ago
parent
commit
63ec5af8a1
  1. 6
      pcbnew/pcb_base_frame.cpp

6
pcbnew/pcb_base_frame.cpp

@ -263,6 +263,7 @@ void PCB_BASE_FRAME::FocusOnItems( std::vector<BOARD_ITEM*> aItems, PCB_LAYER_ID
{
static std::vector<KIID> lastBrightenedItemIDs;
bool itemsUnbrightened = false;
BOARD_ITEM* lastItem = nullptr;
for( KIID lastBrightenedItemID : lastBrightenedItemIDs )
@ -287,10 +288,13 @@ void PCB_BASE_FRAME::FocusOnItems( std::vector<BOARD_ITEM*> aItems, PCB_LAYER_ID
{
lastItem->ClearBrightened();
GetCanvas()->GetView()->Update( lastItem );
GetCanvas()->Refresh();
itemsUnbrightened = true;
}
}
if( itemsUnbrightened )
GetCanvas()->Refresh();
lastBrightenedItemIDs.clear();
if( aItems.empty() )

Loading…
Cancel
Save