Remove very old workaround for incorrect screen dpi which

messes with layout zoom factor calculation on hi-dpi displays
This commit is contained in:
Nyall Dawson 2023-06-21 16:15:27 +10:00
parent 3755c7bf35
commit 1dc44ca350
2 changed files with 2 additions and 8 deletions

View File

@ -1824,10 +1824,7 @@ void QgsLayoutDesignerDialog::updateStatusZoom()
}
else
{
double dpi = mScreenHelper->screenDpi();
//monitor dpi is not always correct - so make sure the value is sane
if ( ( dpi < 60 ) || ( dpi > 1200 ) )
dpi = 72;
const double dpi = mScreenHelper->screenDpi();
//pixel width for 1mm on screen
double scale100 = dpi / 25.4;

View File

@ -206,10 +206,7 @@ void QgsLayoutView::setZoomLevel( double level )
}
else
{
double dpi = mScreenHelper->screenDpi();
//monitor dpi is not always correct - so make sure the value is sane
if ( ( dpi < 60 ) || ( dpi > 1200 ) )
dpi = 72;
const double dpi = mScreenHelper->screenDpi();
//desired pixel width for 1mm on screen
level = std::clamp( level, MIN_VIEW_SCALE, MAX_VIEW_SCALE );