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
parent e1865c1178
commit cc51807241
1 changed files with 2 additions and 2 deletions

View File

@ -1452,8 +1452,8 @@ void SCH_DRAWING_TOOLS::sizeSheet( SCH_SHEET* aSheet, const VECTOR2I& aPos )
wxPoint pos = aSheet->GetPosition();
wxPoint size = (wxPoint) 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 ) );
wxPoint grid = m_frame->GetNearestGridPosition( pos + size );
aSheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );