From 2b954f6c7c5d6fcc4154d0de070a33dd779d9ac2 Mon Sep 17 00:00:00 2001 From: yugecin Date: Tue, 2 Oct 2018 23:54:55 +0200 Subject: [PATCH] also search in list option values when searching in options menu --- src/yugecin/opsudance/options/Option.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/yugecin/opsudance/options/Option.java b/src/yugecin/opsudance/options/Option.java index 76acf4f0..7f31a142 100644 --- a/src/yugecin/opsudance/options/Option.java +++ b/src/yugecin/opsudance/options/Option.java @@ -75,6 +75,14 @@ public class Option { return false; } filtered = !name.toLowerCase().contains(searchString) && !description.toLowerCase().contains(searchString); + if (this instanceof ListOption) { + for (Object itm : ((ListOption) this).getListItems()) { + if (itm != null && itm.toString().toLowerCase().contains(searchString)) { + filtered = false; + return false; + } + } + } return filtered; }