@@ -200,7 +200,10 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
200
200
if ( mFilter == " " || !mModel ) return true ;
201
201
202
202
QModelIndex sourceIndex = mModel ->index ( sourceRow, 0 , sourceParent );
203
- return filterAcceptsItem ( sourceIndex ) || filterAcceptsAncestor ( sourceIndex ) || filterAcceptsDescendant ( sourceIndex );
203
+ // also look into the comment column
204
+ QModelIndex commentIndex = mModel ->index ( sourceRow, 1 , sourceParent );
205
+ return filterAcceptsItem ( sourceIndex ) || filterAcceptsAncestor ( sourceIndex ) || filterAcceptsDescendant ( sourceIndex ) ||
206
+ filterAcceptsItem ( commentIndex ) || filterAcceptsAncestor ( commentIndex ) || filterAcceptsDescendant ( commentIndex );
204
207
}
205
208
206
209
// returns true if at least one ancestor is accepted by filter
@@ -232,6 +235,11 @@ class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
232
235
return true ;
233
236
if ( filterAcceptsDescendant ( sourceChildIndex ) )
234
237
return true ;
238
+ sourceChildIndex = mModel ->index ( i, 1 , sourceIndex );
239
+ if ( filterAcceptsItem ( sourceChildIndex ) )
240
+ return true ;
241
+ if ( filterAcceptsDescendant ( sourceChildIndex ) )
242
+ return true ;
235
243
}
236
244
return false ;
237
245
}
@@ -532,6 +540,7 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
532
540
// provide a horizontal scroll bar instead of using ellipse (...) for longer items
533
541
mBrowserView ->setTextElideMode ( Qt::ElideNone );
534
542
mBrowserView ->header ()->setResizeMode ( 0 , QHeaderView::ResizeToContents );
543
+ mBrowserView ->header ()->setResizeMode ( 1 , QHeaderView::ResizeToContents );
535
544
mBrowserView ->header ()->setStretchLastSection ( false );
536
545
537
546
// selectionModel is created when model is set on tree
0 commit comments