Skip to content
Permalink
Browse files
Qt compat
  • Loading branch information
m-kuhn committed Jul 12, 2021
1 parent 8c784de commit da301afeca60e99ce76f1df302f3ccdde603ab70
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsmapcanvas.cpp
@@ -987,7 +987,8 @@ void QgsMapCanvas::updateDevicePixelFromScreen()
// TODO: QGIS 4 -> always respect screen dpi
if ( QgsSettingsRegistryGui::settingsRespectScreenDPI.value() )
{
mSettings.setOutputDpi( screen()->physicalDotsPerInch() );
if ( window()->windowHandle() )
mSettings.setOutputDpi( window()->windowHandle()->screen()->physicalDotsPerInch() );
}
else
{

0 comments on commit da301af

Please sign in to comment.