sct: Use height instead of width when calculating dotsPerMeterY

This commit is contained in:
Albert Astals Cid 2025-03-03 21:43:21 +01:00 committed by Mirco Miranda
parent 25cc8bc262
commit 5d2540c135

View File

@ -221,10 +221,10 @@ public:
auto v = QString::fromLatin1(pchar_t(res.data()), res.size()).toDouble(&ok); auto v = QString::fromLatin1(pchar_t(res.data()), res.size()).toDouble(&ok);
if (ok && v > 0) { if (ok && v > 0) {
if (m_pb._unitsOfMeasurement) { // Inches if (m_pb._unitsOfMeasurement) { // Inches
return qRound(width() / v / 25.4 * 1000); return qRound(height() / v / 25.4 * 1000);
} }
// Millimeters // Millimeters
return qRound(width() / v * 1000); return qRound(height() / v * 1000);
} }
return 0; return 0;
} }