File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -289,17 +289,24 @@ void QgsBrowserProxyModel::setShownDataItemProviderKeyFilter( const QStringList
289
289
{
290
290
mShownDataItemsKeys = filter;
291
291
invalidateFilter ();
292
-
293
292
}
294
293
295
294
296
295
bool QgsBrowserProxyModel::hasChildren ( const QModelIndex &parent ) const
297
296
{
298
297
bool isFertile { QSortFilterProxyModel::hasChildren ( parent ) };
299
- if ( isFertile && ! mShowLayers && parent.isValid () )
298
+ if ( isFertile && parent.isValid () )
300
299
{
301
300
QgsDataItem *item = dataItem ( parent );
302
- return ! item->layerCollection ();
301
+ if ( ! mShowLayers )
302
+ {
303
+ return ! item->layerCollection ();
304
+ }
305
+ // Hide everything below layers if filter is set
306
+ else if ( mFilterByLayerType && qobject_cast< QgsLayerItem * >( item ) )
307
+ {
308
+ return false ;
309
+ }
303
310
}
304
311
return isFertile;
305
312
}
You can’t perform that action at this time.
0 commit comments