mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
add a special value to update threshold spinbox (follows e09683b1)
This commit is contained in:
parent
7cceaaf73b
commit
08fc298f85
@ -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() );
|
||||
|
@ -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;
|
||||
|
@ -1645,7 +1645,7 @@
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="textLabel3">
|
||||
<property name="text">
|
||||
<string><b>Note:</b> Use zero to prevent display updates until all features have been rendered</string>
|
||||
<string><b>Note:</b> Set below 1000 to prevent display updates until all features have been rendered</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user