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:
parent
e1865c1178
commit
cc51807241
|
@ -1452,8 +1452,8 @@ void SCH_DRAWING_TOOLS::sizeSheet( SCH_SHEET* aSheet, const VECTOR2I& aPos )
|
||||||
wxPoint pos = aSheet->GetPosition();
|
wxPoint pos = aSheet->GetPosition();
|
||||||
wxPoint size = (wxPoint) aPos - pos;
|
wxPoint size = (wxPoint) aPos - pos;
|
||||||
|
|
||||||
size.x = std::max( size.x, MIN_SHEET_WIDTH );
|
size.x = std::max( size.x, Mils2iu( MIN_SHEET_WIDTH ) );
|
||||||
size.y = std::max( size.y, MIN_SHEET_HEIGHT );
|
size.y = std::max( size.y, Mils2iu( MIN_SHEET_HEIGHT ) );
|
||||||
|
|
||||||
wxPoint grid = m_frame->GetNearestGridPosition( pos + size );
|
wxPoint grid = m_frame->GetNearestGridPosition( pos + size );
|
||||||
aSheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );
|
aSheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) );
|
||||||
|
|
Loading…
Reference in New Issue