Skip to content

Commit ca8d82f

Browse files
committedNov 15, 2017
Add a setting to be able to disable preview jobs in main canvas
Can be used by power users to disable preview jobs, for very slow datasources (especially when network bandwidth is saturated), where it decreases performance. More clever approaches have been discussed per #5645 and https://lists.osgeo.org/pipermail/qgis-developer/2017-November/050524.html, but at least offer this setting for now, pending further improvements.
1 parent 581d0d3 commit ca8d82f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,13 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
717717
connect( mMapCanvas, &QgsMapCanvas::messageEmitted, this, &QgisApp::displayMessage );
718718
mMapCanvas->setWhatsThis( tr( "Map canvas. This is where raster and vector "
719719
"layers are displayed when added to the map" ) );
720-
mMapCanvas->setPreviewJobsEnabled( true );
720+
721+
if ( settings.value( QStringLiteral( "qgis/main_canvas_preview_jobs" ) ).isNull() )
722+
{
723+
// So that it appears in advanced settings
724+
settings.setValue( QStringLiteral( "qgis/main_canvas_preview_jobs" ), true );
725+
}
726+
mMapCanvas->setPreviewJobsEnabled( settings.value( QStringLiteral( "qgis/main_canvas_preview_jobs" ), true ).toBool() );
721727

722728
// set canvas color right away
723729
int myRed = settings.value( QStringLiteral( "qgis/default_canvas_color_red" ), 255 ).toInt();

0 commit comments

Comments
 (0)
Please sign in to comment.