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:
@@ -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() );
|
||||
|
||||
Reference in New Issue
Block a user