Fix: View: Don't delete items that are filtered out

Pressing X over tree view will delete active item regardless it's
filtered out by search string. Add `is_filtered_visible` to avoid this.

Pull Request: https://projects.blender.org/blender/blender/pulls/155762
This commit is contained in:
Pratik Borhade 2026-03-17 11:55:05 +01:00 • committed by Pratik Borhade
parent c0eb6dd64e
commit bcdf4fbde3

View file

@ -2906,6 +2906,9 @@ static wmOperatorStatus view_item_delete_invoke(bContext *C,
AbstractView *view = get_view_focused(C);
view->foreach_view_item([&](AbstractViewItem &item) {
if (!item.is_filtered_visible()) {
return;
}
if (item.is_active() || item.is_selected()) {
item.delete_item(C);
}