Skip to content

Commit

Permalink
Don't store "avoid tile artefacts" project setting in the map canvas
Browse files Browse the repository at this point in the history
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 04d6ea9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgsprojectproperties.cpp
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 04d6ea9

Please sign in to comment.