From 94c191362c4924e3679d1325d5833848c373ab09 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 26 Apr 2020 01:42:36 +0200 Subject: [PATCH] fix filter for DataTree's --- src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java | 3 ++- src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java b/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java index 5d57ddb6..a964a8e8 100644 --- a/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java +++ b/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeAuthors.java @@ -17,7 +17,8 @@ public class DataTreeAuthors extends DataTreeSources { @Override protected boolean checkFilter(String filter, DataNodeBook userData) { - return userData.toString().toLowerCase().contains(filter.toLowerCase()); + return userData.getSubnameOrName().toLowerCase() + .contains(filter.toLowerCase()); } @Override diff --git a/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java b/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java index 71c542c4..f94c105d 100644 --- a/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java +++ b/src/be/nikiroo/fanfix_swing/gui/utils/DataTreeTag.java @@ -17,7 +17,8 @@ public class DataTreeTag extends DataTreeSources { @Override protected boolean checkFilter(String filter, DataNodeBook userData) { - return userData.toString().toLowerCase().contains(filter.toLowerCase()); + return userData + .getSubnameOrName().toLowerCase().contains(filter.toLowerCase()); } @Override -- 2.27.0