Fix: Outliner: Don't affect collection in hide unselected operator

Keep collection visibility as it is when collection is selected and
shift + H is pressed

llm-test/llm-reports#1188

Pull Request: https://projects.blender.org/blender/blender/pulls/162830
This commit is contained in:
Pratik Borhade 2026-08-19 08:09:01 +02:00 • committed by Pratik Borhade
parent 22264abfb5
commit 404d84dba5

View file

@ -1505,7 +1505,7 @@ static TreeTraversalAction outliner_hide_collect_data_to_edit(TreeElement *te, v
/* Skip - showing warning/error message might be misleading
* when deleting multiple collections, so just do nothing. */
}
else if (tselem->flag & TSE_SELECTED) {
else if (!data->hide_unselected && tselem->flag & TSE_SELECTED) {
/* Delete, duplicate and link don't edit children,
* those will come along with the parents. */
data->collections_to_edit.add(lc);