diff --git a/common/eda_text.cpp b/common/eda_text.cpp index 5742f6c229..8d3b33eb9a 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -316,7 +316,9 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const // interline spacing is only *between* lines, so total height is the height of the first // line plus the interline distance (with interline spacing) for all subsequent lines - textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline ); + // Don't add interline spacing to empty textboxes + if( strings.GetCount() ) + textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline ); } rect.SetSize( textsize );