Skip to content

Commit

Permalink
fix #4812
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 14, 2012
1 parent 8930633 commit 10dbb6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/attributetable/qgsattributetablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ bool QgsAttributeTableModel::featureAtId( QgsFeatureId fid ) const
else if ( mLayer->featureAtId( fid, mFeat, false, true ) )
{
QSettings settings;
int cacheSize = settings.value( "/qgis/attributeTableRowCache", "10000" ).toInt();
int cacheSize = qMax( 1, settings.value( "/qgis/attributeTableRowCache", "10000" ).toInt() );

if ( mFeatureQueue.size() == cacheSize )
while ( mFeatureQueue.size() >= cacheSize )
{
mFeatureMap.remove( mFeatureQueue.dequeue() );
}
Expand Down
3 changes: 3 additions & 0 deletions src/ui/qgsoptionsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@
</item>
<item>
<widget class="QSpinBox" name="spinBoxAttrTableRowCache">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100000</number>
</property>
Expand Down

0 comments on commit 10dbb6a

Please sign in to comment.