From cc5180724119f6a947031c8390cc1e083feb0515 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Mon, 18 Apr 2022 02:16:17 +0200 Subject: [PATCH] Fix minimum size calculation for new hierarchical sheets These constants are given in mil, but are used in a context of internal units. --- eeschema/tools/sch_drawing_tools.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 0dd0d411dc..31a704099e 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -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 ) );