File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -229,11 +229,14 @@ void QgsAttributeTableDialog::columnBoxInit()
229
229
}
230
230
231
231
mFilterButton ->addAction ( mActionShowAllFilter );
232
- mFilterButton ->addAction ( mActionAdvancedFilter );
233
232
mFilterButton ->addAction ( mActionSelectedFilter );
234
- mFilterButton ->addAction ( mActionVisibleFilter );
233
+ if ( mLayer ->hasGeometryType () )
234
+ {
235
+ mFilterButton ->addAction ( mActionVisibleFilter );
236
+ }
235
237
mFilterButton ->addAction ( mActionEditedFilter );
236
238
mFilterButton ->addAction ( mActionFilterColumnsMenu );
239
+ mFilterButton ->addAction ( mActionAdvancedFilter );
237
240
238
241
QList<QgsField> fields = mLayer ->pendingFields ().toList ();
239
242
@@ -309,6 +312,12 @@ void QgsAttributeTableDialog::filterSelected()
309
312
310
313
void QgsAttributeTableDialog::filterVisible ()
311
314
{
315
+ if ( !mLayer ->hasGeometryType () )
316
+ {
317
+ filterShowAll ();
318
+ return ;
319
+ }
320
+
312
321
mFilterButton ->setDefaultAction ( mActionVisibleFilter );
313
322
mFilterButton ->setPopupMode ( QToolButton::InstantPopup );
314
323
mCbxCaseSensitive ->setVisible ( false );
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ void QgsAttributeTableFilterModel::generateListOfVisibleFeatures()
223
223
if ( !renderer )
224
224
{
225
225
QgsDebugMsg ( " Cannot get renderer" );
226
+ return ;
226
227
}
227
228
228
229
if ( layer ()->hasScaleBasedVisibility () &&
Original file line number Diff line number Diff line change 557
557
<normaloff >:/images/themes/default/mActionFilter.png</normaloff >:/images/themes/default/mActionFilter.png</iconset >
558
558
</property >
559
559
<property name =" text" >
560
- <string >Show All</string >
560
+ <string >Show All Features </string >
561
561
</property >
562
562
</action >
563
563
<action name =" mActionSelectedFilter" >
566
566
<normaloff >:/images/themes/default/mActionFilter.png</normaloff >:/images/themes/default/mActionFilter.png</iconset >
567
567
</property >
568
568
<property name =" text" >
569
- <string >Show Selected</string >
569
+ <string >Show Selected Features </string >
570
570
</property >
571
571
</action >
572
572
<action name =" mActionVisibleFilter" >
589
589
<normaloff >:/images/themes/default/mActionFilter.png</normaloff >:/images/themes/default/mActionFilter.png</iconset >
590
590
</property >
591
591
<property name =" text" >
592
- <string >Filter Edited</string >
592
+ <string >Show Edited and New Features </string >
593
593
</property >
594
594
<property name =" toolTip" >
595
595
<string >Filter all the features which have been edited but not yet saved</string >
You can’t perform that action at this time.
0 commit comments