Skip to content

Commit

Permalink
Qt compat
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jul 12, 2021
1 parent 8c784de commit da301af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -987,7 +987,8 @@ void QgsMapCanvas::updateDevicePixelFromScreen()
// TODO: QGIS 4 -> always respect screen dpi // TODO: QGIS 4 -> always respect screen dpi
if ( QgsSettingsRegistryGui::settingsRespectScreenDPI.value() ) if ( QgsSettingsRegistryGui::settingsRespectScreenDPI.value() )
{ {
mSettings.setOutputDpi( screen()->physicalDotsPerInch() ); if ( window()->windowHandle() )
mSettings.setOutputDpi( window()->windowHandle()->screen()->physicalDotsPerInch() );
} }
else else
{ {
Expand Down

0 comments on commit da301af

Please sign in to comment.