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 1c9895f8d3
commit 1e529bcc7d

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();