Make it clear that GetSheets() is heavy.

Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
This commit is contained in:
Jeff Young
2024-06-06 18:00:59 +01:00
parent 616510aca2
commit edc7603d2a
64 changed files with 288 additions and 336 deletions
+1 -1
View File
@@ -567,7 +567,7 @@ void SCH_COMMIT::Revert()
{
// Lazy eval of sheet list; this is expensive even when unsorted
if( sheets.empty() )
sheets = schematic->GetUnorderedSheets();
sheets = schematic->BuildUnorderedSheetList();
SCH_SHEET_PATH sheet = sheets.FindSheetForScreen( screen );
symbol->SetRef( &sheet, field->GetText() );