diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index 44a9b4863da..404287534da 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -360,7 +360,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) : #endif // set the display update threshold - spinBoxUpdateThreshold->setValue( settings.value( "/Map/updateThreshold" ).toInt() ); + spinBoxUpdateThreshold->setSpecialValueText( tr( "All" ) ); + spinBoxUpdateThreshold->setMinimum( 999 ); + spinBoxUpdateThreshold->setValue( qMax( 999, settings.value( "/Map/updateThreshold" ).toInt() ) ); // log rendering events, for userspace debugging mLogCanvasRefreshChkBx->setChecked( settings.value( "/Map/logCanvasRefreshEvent", false ).toBool() ); @@ -1051,7 +1053,8 @@ void QgsOptions::saveOptions() settings.setValue( "/Raster/cumulativeCutUpper", mRasterCumulativeCutUpperDoubleSpinBox->value() / 100.0 ); settings.setValue( "/Map/enableBackbuffer", chkEnableBackbuffer->isChecked() ); - settings.setValue( "/Map/updateThreshold", spinBoxUpdateThreshold->value() ); + int threshold = spinBoxUpdateThreshold->value(); + settings.setValue( "/Map/updateThreshold", threshold < 1000 ? 0 : threshold ); // log rendering events, for userspace debugging settings.setValue( "/Map/logCanvasRefreshEvent", mLogCanvasRefreshChkBx->isChecked() ); diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index ebcb9e3f53a..778a199ccc2 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -655,8 +655,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext ) mUpdateThreshold = settings.value( "Map/updateThreshold", 0 ).toInt(); // users could accidently set updateThreshold threshold to a small value // and complain about bad performance -> force min 1000 here - // TODO: improve GUI (checkbox?) to make obvious the min value (cannot set min - // on spinbox because 0 as used for no refresh) if ( mUpdateThreshold > 0 && mUpdateThreshold < 1000 ) { mUpdateThreshold = 1000; diff --git a/src/ui/qgsoptionsbase.ui b/src/ui/qgsoptionsbase.ui index 9ba9ef6f280..663d554b8d7 100644 --- a/src/ui/qgsoptionsbase.ui +++ b/src/ui/qgsoptionsbase.ui @@ -1645,7 +1645,7 @@ - <b>Note:</b> Use zero to prevent display updates until all features have been rendered + <b>Note:</b> Set below 1000 to prevent display updates until all features have been rendered