From bc587257f0a9b1b7530d3b90cbdf2749aeb6a9ef Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Sat, 23 Dec 2023 18:18:35 -0500 Subject: [PATCH] Use filterRegularExpression in SortFilterProxyModel Signed-off-by: Geoff Hutchison --- avogadro/qtgui/sortfiltertreeproxymodel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avogadro/qtgui/sortfiltertreeproxymodel.cpp b/avogadro/qtgui/sortfiltertreeproxymodel.cpp index 54786153f5..8f10dadc00 100644 --- a/avogadro/qtgui/sortfiltertreeproxymodel.cpp +++ b/avogadro/qtgui/sortfiltertreeproxymodel.cpp @@ -35,7 +35,8 @@ bool SortFilterTreeProxyModel::filterAcceptsRow( bool childOfRoot = false; QModelIndex parent = sourceParent; for (int depth = 3; depth > 0; depth--) { - if (sourceModel()->data(parent).toString().contains(filterRegExp())) + if (sourceModel()->data(parent).toString().contains( + filterRegularExpression())) return true; // a parent matches the pattern parent = parent.parent();