Skip to content

Commit e47f111

Browse files
committedJul 23, 2014
Setting attribute table cache size to 0 results in full cache
1 parent 17d6da9 commit e47f111

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed
 

‎src/gui/attributetable/qgsdualview.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ void QgsDualView::initLayerCache( QgsVectorLayer* layer )
208208
{
209209
// Initialize the cache
210210
QSettings settings;
211-
int cacheSize = qMax( 1, settings.value( "/qgis/attributeTableRowCache", "10000" ).toInt() );
211+
int cacheSize = settings.value( "/qgis/attributeTableRowCache", "10000" ).toInt();
212212
mLayerCache = new QgsVectorLayerCache( layer, cacheSize, this );
213213
mLayerCache->setCacheGeometry( false );
214-
if ( 0 == ( QgsVectorDataProvider::SelectAtId & mLayerCache->layer()->dataProvider()->capabilities() ) )
214+
if ( 0 == cacheSize || 0 == ( QgsVectorDataProvider::SelectAtId & mLayerCache->layer()->dataProvider()->capabilities() ) )
215215
{
216216
connect( mLayerCache, SIGNAL( progress( int, bool & ) ), this, SLOT( progress( int, bool & ) ) );
217217
connect( mLayerCache, SIGNAL( finished() ), this, SLOT( finished() ) );

‎src/ui/qgsoptionsbase.ui

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
<item>
252252
<widget class="QStackedWidget" name="mOptionsStackedWidget">
253253
<property name="currentIndex">
254-
<number>0</number>
254+
<number>2</number>
255255
</property>
256256
<widget class="QWidget" name="mOptionsPageGeneral">
257257
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -271,8 +271,8 @@
271271
<rect>
272272
<x>0</x>
273273
<y>0</y>
274-
<width>610</width>
275-
<height>640</height>
274+
<width>613</width>
275+
<height>606</height>
276276
</rect>
277277
</property>
278278
<layout class="QVBoxLayout" name="verticalLayout_28">
@@ -934,8 +934,8 @@
934934
<rect>
935935
<x>0</x>
936936
<y>0</y>
937-
<width>655</width>
938-
<height>862</height>
937+
<width>644</width>
938+
<height>860</height>
939939
</rect>
940940
</property>
941941
<layout class="QVBoxLayout" name="verticalLayout_22">
@@ -1309,8 +1309,8 @@
13091309
<rect>
13101310
<x>0</x>
13111311
<y>0</y>
1312-
<width>531</width>
1313-
<height>440</height>
1312+
<width>626</width>
1313+
<height>549</height>
13141314
</rect>
13151315
</property>
13161316
<layout class="QVBoxLayout" name="verticalLayout_27">
@@ -1404,7 +1404,7 @@
14041404
<item>
14051405
<widget class="QSpinBox" name="spinBoxAttrTableRowCache">
14061406
<property name="minimum">
1407-
<number>1</number>
1407+
<number>0</number>
14081408
</property>
14091409
<property name="maximum">
14101410
<number>100000</number>
@@ -1619,8 +1619,8 @@
16191619
<rect>
16201620
<x>0</x>
16211621
<y>0</y>
1622-
<width>710</width>
1623-
<height>796</height>
1622+
<width>686</width>
1623+
<height>764</height>
16241624
</rect>
16251625
</property>
16261626
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -2258,8 +2258,8 @@
22582258
<rect>
22592259
<x>0</x>
22602260
<y>0</y>
2261-
<width>486</width>
2262-
<height>330</height>
2261+
<width>475</width>
2262+
<height>316</height>
22632263
</rect>
22642264
</property>
22652265
<layout class="QVBoxLayout" name="verticalLayout_25">
@@ -2587,8 +2587,8 @@
25872587
<rect>
25882588
<x>0</x>
25892589
<y>0</y>
2590-
<width>664</width>
2591-
<height>628</height>
2590+
<width>647</width>
2591+
<height>657</height>
25922592
</rect>
25932593
</property>
25942594
<layout class="QVBoxLayout" name="verticalLayout_30">
@@ -3083,8 +3083,8 @@
30833083
<rect>
30843084
<x>0</x>
30853085
<y>0</y>
3086-
<width>626</width>
3087-
<height>549</height>
3086+
<width>486</width>
3087+
<height>301</height>
30883088
</rect>
30893089
</property>
30903090
<layout class="QVBoxLayout" name="verticalLayout_39">
@@ -3264,8 +3264,8 @@
32643264
<rect>
32653265
<x>0</x>
32663266
<y>0</y>
3267-
<width>501</width>
3268-
<height>640</height>
3267+
<width>480</width>
3268+
<height>616</height>
32693269
</rect>
32703270
</property>
32713271
<layout class="QVBoxLayout" name="verticalLayout_31">
@@ -3755,8 +3755,8 @@
37553755
<rect>
37563756
<x>0</x>
37573757
<y>0</y>
3758-
<width>462</width>
3759-
<height>372</height>
3758+
<width>450</width>
3759+
<height>366</height>
37603760
</rect>
37613761
</property>
37623762
<layout class="QVBoxLayout" name="verticalLayout_6">
@@ -3885,8 +3885,8 @@
38853885
<rect>
38863886
<x>0</x>
38873887
<y>0</y>
3888-
<width>650</width>
3889-
<height>707</height>
3888+
<width>622</width>
3889+
<height>696</height>
38903890
</rect>
38913891
</property>
38923892
<layout class="QGridLayout" name="gridLayout_15">
@@ -4139,8 +4139,8 @@
41394139
<rect>
41404140
<x>0</x>
41414141
<y>0</y>
4142-
<width>300</width>
4143-
<height>226</height>
4142+
<width>293</width>
4143+
<height>216</height>
41444144
</rect>
41454145
</property>
41464146
<layout class="QVBoxLayout" name="verticalLayout_32">
@@ -4229,8 +4229,8 @@
42294229
<rect>
42304230
<x>0</x>
42314231
<y>0</y>
4232-
<width>531</width>
4233-
<height>685</height>
4232+
<width>501</width>
4233+
<height>678</height>
42344234
</rect>
42354235
</property>
42364236
<layout class="QVBoxLayout" name="verticalLayout_33">

0 commit comments

Comments
 (0)
Please sign in to comment.