mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 10:43:15 +02:00
Preserve highlighted connection through a recalculation
This commit is contained in:
parent
126cd14715
commit
8cbd754362
@ -1297,6 +1297,13 @@ void SCH_EDIT_FRAME::initScreenZoom()
|
|||||||
|
|
||||||
void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
||||||
{
|
{
|
||||||
|
const SCH_CONNECTION* highlight = GetHighlightedConnection();
|
||||||
|
SCH_ITEM* highlightedItem = highlight ? highlight->Parent() : nullptr;
|
||||||
|
SCH_SHEET_PATH highlightPath;
|
||||||
|
|
||||||
|
if( highlight )
|
||||||
|
highlightPath = highlight->Sheet();
|
||||||
|
|
||||||
SCHEMATIC_SETTINGS& settings = Schematic().Settings();
|
SCHEMATIC_SETTINGS& settings = Schematic().Settings();
|
||||||
SCH_SHEET_LIST list = Schematic().GetSheets();
|
SCH_SHEET_LIST list = Schematic().GetSheets();
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
@ -1329,6 +1336,9 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
|||||||
};
|
};
|
||||||
|
|
||||||
Schematic().ConnectionGraph()->Recalculate( list, true, &changeHandler );
|
Schematic().ConnectionGraph()->Recalculate( list, true, &changeHandler );
|
||||||
|
|
||||||
|
if( highlightedItem )
|
||||||
|
SetHighlightedConnection( highlightedItem->Connection( &highlightPath ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user