From: Niki Roo Date: Sat, 25 Apr 2020 23:42:36 +0000 (+0200) Subject: fix filter for DataTree's X-Git-Tag: fanfix-swing-1.0.0~24 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=94c191362c4924e3679d1325d5833848c373ab09;p=fanfix-swing.git fix filter for DataTree's --- 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