Make sure intersheetRef bounding boxes get updated in RTree.

Fixes https://gitlab.com/kicad/code/kicad/issues/9177
This commit is contained in:
Jeff Young 2021-09-18 18:18:41 +01:00
parent b931883876
commit a291cae2fd
2 changed files with 8 additions and 4 deletions

View File

@ -1369,12 +1369,16 @@ void SCH_EDIT_FRAME::RecomputeIntersheetRefs()
/* Refresh all global labels */ /* Refresh all global labels */
for( EDA_ITEM* item : GetScreen()->Items().OfType( SCH_GLOBAL_LABEL_T ) ) for( EDA_ITEM* item : GetScreen()->Items().OfType( SCH_GLOBAL_LABEL_T ) )
{ {
SCH_GLOBALLABEL* global = static_cast<SCH_GLOBALLABEL*>( item ); SCH_GLOBALLABEL* gLabel = (SCH_GLOBALLABEL*)( item );
SCH_FIELD* intersheetRef = gLabel->GetIntersheetRefs();
global->GetIntersheetRefs()->SetVisible( show ); intersheetRef->SetVisible( show );
if( show ) if( show )
GetCanvas()->GetView()->Update( global ); {
GetScreen()->Update( gLabel );
GetCanvas()->GetView()->Update( gLabel );
}
} }
} }

View File

@ -609,7 +609,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
// We are checking if we should display a pencil when hovering over anchors // We are checking if we should display a pencil when hovering over anchors
// for "auto starting" wires when clicked // for "auto starting" wires when clicked
if( CollectHits( collector, evt->Position()) ) if( CollectHits( collector, evt->Position() ) )
{ {
narrowSelection( collector, evt->Position(), false ); narrowSelection( collector, evt->Position(), false );