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 )
|
||||
{
|
||||
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();
|
||||
SCH_SHEET_LIST list = Schematic().GetSheets();
|
||||
#ifdef PROFILE
|
||||
|
@ -1329,6 +1336,9 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags )
|
|||
};
|
||||
|
||||
Schematic().ConnectionGraph()->Recalculate( list, true, &changeHandler );
|
||||
|
||||
if( highlightedItem )
|
||||
SetHighlightedConnection( highlightedItem->Connection( &highlightPath ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue