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
parent d3386bbf50
commit e98467d954

View File

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