CADSTAR Sch: Fix calculation of page size
Don't attempt to calculate bounding box of text variables. We do not know the resolution of the text variable inside the importer. The resolved text could be shorter than the text variable (e.g. ${#} page number)
This commit is contained in:
parent
0aba025d66
commit
8367c7f238
|
@ -173,6 +173,16 @@ void CADSTAR_SCH_ARCHIVE_LOADER::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSh
|
|||
bbox.Merge( field.GetBoundingBox() );
|
||||
}
|
||||
}
|
||||
else if( item->Type() == SCH_TEXT_T )
|
||||
{
|
||||
SCH_TEXT* txtItem = static_cast<SCH_TEXT*>( item );
|
||||
wxString txt = txtItem->GetText();
|
||||
|
||||
if( txt.Contains( "${" ) )
|
||||
continue; // We can't calculate bounding box of text items with variables
|
||||
else
|
||||
bbox = txtItem->GetBoundingBox();
|
||||
}
|
||||
else
|
||||
{
|
||||
bbox = item->GetBoundingBox();
|
||||
|
|
Loading…
Reference in New Issue