Skip to content
Permalink
Browse files

Don't store "avoid tile artefacts" project setting in the map canvas

settings, that's not a stable place to store things like this which
are designed to apply in both desktop and server contexts!

Refs #37679
  • Loading branch information
nyalldawson committed Feb 12, 2021
1 parent 0ee956b commit 04d6ea99b43fb8e426dc1cb31b2b7e913aca203c
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/qgsprojectproperties.cpp
@@ -225,7 +225,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
}
projectionSelector->setPreviewRect( g.boundingBox() );

mMapTileRenderingCheckBox->setChecked( mMapCanvas->mapSettings().testFlag( QgsMapSettings::RenderMapTile ) );
mMapTileRenderingCheckBox->setChecked( QgsProject::instance()->readBoolEntry( QStringLiteral( "RenderMapTile" ), QStringLiteral( "/" ), false ) );

// see end of constructor for updating of projection selector

@@ -1052,6 +1052,7 @@ QgsExpressionContext QgsProjectProperties::createExpressionContext() const
void QgsProjectProperties::apply()
{
mMapCanvas->enableMapTileRendering( mMapTileRenderingCheckBox->isChecked() );
QgsProject::instance()->writeEntry( QStringLiteral( "RenderMapTile" ), QStringLiteral( "/" ), mMapTileRenderingCheckBox->isChecked() );

// important - set the transform context first, as changing the project CRS may otherwise change this and
// cause loss of user changes

0 comments on commit 04d6ea9

Please sign in to comment.