Skip to content
Permalink
Browse files
Ensure that multi-resolution (e.g. xyz tile) layers are correctly
represented when magnifying canvas

The tiles should be magnified, not fetched at increasing zoom levels

Fixes #45336
  • Loading branch information
nyalldawson committed Jan 14, 2022
1 parent e41e487 commit e39f980b6b2855679dac70a4d530b494d06e37fb
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/qgsmapcanvas.cpp
@@ -1063,12 +1063,16 @@ void QgsMapCanvas::updateDevicePixelFromScreen()
if ( QgsSettingsRegistryGui::settingsRespectScreenDPI.value() )
{
if ( window()->windowHandle() )
{
mSettings.setOutputDpi( window()->windowHandle()->screen()->physicalDotsPerInch() );
mSettings.setDpiTarget( window()->windowHandle()->screen()->physicalDotsPerInch() );
}
}
else
{
// Fallback: compatibility with QGIS <= 3.20; always assume low dpi screens
mSettings.setOutputDpi( window()->windowHandle()->screen()->logicalDotsPerInch() );
mSettings.setDpiTarget( window()->windowHandle()->screen()->logicalDotsPerInch() );
}
}

0 comments on commit e39f980

Please sign in to comment.