Fix minimum size calculation for new hierarchical sheets

These constants are given in mil, but are used in a context of internal
units.
This commit is contained in:
Simon Richter 2022-04-18 02:16:17 +02:00 committed by jean-pierre charras
parent 1e505d4c22
commit 801c5deb87
1 changed files with 2 additions and 2 deletions

View File

@ -1688,8 +1688,8 @@ void SCH_DRAWING_TOOLS::sizeSheet( SCH_SHEET* aSheet, const VECTOR2I& aPos )
VECTOR2I pos = aSheet->GetPosition();
VECTOR2I size = aPos - pos;
size.x = std::max( size.x, MIN_SHEET_WIDTH );
size.y = std::max( size.y, MIN_SHEET_HEIGHT );
size.x = std::max( size.x, Mils2iu( MIN_SHEET_WIDTH ) );
size.y = std::max( size.y, Mils2iu( MIN_SHEET_HEIGHT ) );
VECTOR2I grid = m_frame->GetNearestGridPosition( pos + size );
aSheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );