TechDraw: Ensure tolerance font size is > 0

This commit is contained in:
Ladislav Michl
2024-12-16 09:45:51 +01:00
committed by Chris Hennes
parent e657ce9473
commit 2afdd58a88

View File

@@ -466,7 +466,7 @@ void QGIDatumLabel::setFont(QFont font)
QFont tFont(font);
double fontSize = font.pixelSize();
double tolAdj = getTolAdjust();
tFont.setPixelSize((int)(fontSize * tolAdj));
tFont.setPixelSize(std::max(1, (int)(fontSize * tolAdj)));
m_tolTextOver->setFont(tFont);
m_tolTextUnder->setFont(tFont);
updateFrameRect();