File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1424,13 +1424,17 @@ void StelApp::quit()
14241424void StelApp::setDevicePixelsPerPixel (qreal dppp)
14251425{
14261426 // Check that the device-independent pixel size didn't change
1427- if (!viewportEffect && ! fuzzyEquals (devicePixelsPerPixel, dppp))
1427+ if (!fuzzyEquals (devicePixelsPerPixel, dppp))
14281428 {
14291429 qDebug () << " Changing high-DPI scaling factor from" << devicePixelsPerPixel << " to" << dppp;
1430+ const auto effect = getViewportEffect ();
1431+ setViewportEffect (" none" );
14301432 devicePixelsPerPixel = dppp;
14311433 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams ();
14321434 params.devicePixelsPerPixel = devicePixelsPerPixel;
14331435 core->setCurrentStelProjectorParams (params);
1436+ // Force to recreate the viewport effect if any.
1437+ setViewportEffect (effect);
14341438 }
14351439}
14361440
You can’t perform that action at this time.
0 commit comments