Skip to content

Commit 08fc298

Browse files
committedJun 14, 2013
add a special value to update threshold spinbox (follows e09683b)
1 parent 7cceaaf commit 08fc298

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed
 

‎src/app/qgsoptions.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
360360
#endif
361361

362362
// set the display update threshold
363-
spinBoxUpdateThreshold->setValue( settings.value( "/Map/updateThreshold" ).toInt() );
363+
spinBoxUpdateThreshold->setSpecialValueText( tr( "All" ) );
364+
spinBoxUpdateThreshold->setMinimum( 999 );
365+
spinBoxUpdateThreshold->setValue( qMax( 999, settings.value( "/Map/updateThreshold" ).toInt() ) );
364366

365367
// log rendering events, for userspace debugging
366368
mLogCanvasRefreshChkBx->setChecked( settings.value( "/Map/logCanvasRefreshEvent", false ).toBool() );
@@ -1051,7 +1053,8 @@ void QgsOptions::saveOptions()
10511053
settings.setValue( "/Raster/cumulativeCutUpper", mRasterCumulativeCutUpperDoubleSpinBox->value() / 100.0 );
10521054

10531055
settings.setValue( "/Map/enableBackbuffer", chkEnableBackbuffer->isChecked() );
1054-
settings.setValue( "/Map/updateThreshold", spinBoxUpdateThreshold->value() );
1056+
int threshold = spinBoxUpdateThreshold->value();
1057+
settings.setValue( "/Map/updateThreshold", threshold < 1000 ? 0 : threshold );
10551058

10561059
// log rendering events, for userspace debugging
10571060
settings.setValue( "/Map/logCanvasRefreshEvent", mLogCanvasRefreshChkBx->isChecked() );

‎src/core/qgsvectorlayer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,8 +655,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
655655
mUpdateThreshold = settings.value( "Map/updateThreshold", 0 ).toInt();
656656
// users could accidently set updateThreshold threshold to a small value
657657
// and complain about bad performance -> force min 1000 here
658-
// TODO: improve GUI (checkbox?) to make obvious the min value (cannot set min
659-
// on spinbox because 0 as used for no refresh)
660658
if ( mUpdateThreshold > 0 && mUpdateThreshold < 1000 )
661659
{
662660
mUpdateThreshold = 1000;

‎src/ui/qgsoptionsbase.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@
16451645
<item row="3" column="0" colspan="2">
16461646
<widget class="QLabel" name="textLabel3">
16471647
<property name="text">
1648-
<string>&lt;b&gt;Note:&lt;/b&gt; Use zero to prevent display updates until all features have been rendered</string>
1648+
<string>&lt;b&gt;Note:&lt;/b&gt; Set below 1000 to prevent display updates until all features have been rendered</string>
16491649
</property>
16501650
</widget>
16511651
</item>

0 commit comments

Comments
 (0)
Please sign in to comment.