Compare commits

..

2 Commits

Author SHA1 Message Date
Serhii Snitsaruk f14a19b947
Merge pull request #189 from ydeltastar/filter-fix
Make player filter in the debugger case-insensitive
2024-08-07 10:11:19 +02:00
yds 1b04a8589f Make player filter in the debugger case-insensitive 2024-08-06 16:34:06 -03:00
1 changed files with 2 additions and 1 deletions

View File

@ -120,8 +120,9 @@ void LimboDebuggerTab::_update_bt_instance_list(const Vector<BTInstanceInfo> &p_
bt_instance_list->clear(); bt_instance_list->clear();
int select_idx = -1; int select_idx = -1;
bool selection_filtered_out = false; bool selection_filtered_out = false;
String filter = p_filter.to_lower();
for (const BTInstanceInfo &info : p_instances) { for (const BTInstanceInfo &info : p_instances) {
if (p_filter.is_empty() || info.owner_node_path.contains(p_filter)) { if (filter.is_empty() || info.owner_node_path.to_lower().contains(filter)) {
int idx = bt_instance_list->add_item(info.owner_node_path); int idx = bt_instance_list->add_item(info.owner_node_path);
bt_instance_list->set_item_metadata(idx, info.instance_id); bt_instance_list->set_item_metadata(idx, info.instance_id);
// Make item text shortened from the left, e.g ".../Agent/BTPlayer". // Make item text shortened from the left, e.g ".../Agent/BTPlayer".