Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-09-15 17:38:19 +0300
committerHans Goudey <h.goudey@me.com>2020-09-15 17:38:19 +0300
commit67e630609bb408e366398cb7ea9fdc09f31190e7 (patch)
tree3407d0cec29bc2b685a53334a7d6c0bc8d2d4e55 /source/blender/editors/interface/interface.c
parentf886e138365b610adf932d38ba663fa81380ce29 (diff)
Property Search: Build button groups for Search
This is needed for property search (upcoming patch D8856) where a buttons labels are often separate buttons, but we need to highlight the label to show that a property is a search result. This is especially important in "property split" layouts where the label is almost always another button in a separate column. The button groups here are basically a flattened view of the buttons in the layout tree. Every function that adds a new set of buttons creates a new button group, and the new buttons are automatically added to the most recent group. Then, each group is searched separately in the property search phase. It's important that every function adding a new button set calls layout_root_new_button_group. Note that this won't be disabled when property search isn't active. It may be useful for other things in the future, and trying to pass that information to layout functions didn't feel worth it to me. Differential Revision: https://developer.blender.org/D8783
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 8e7fc807835..b9a001a9571 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3943,6 +3943,7 @@ uiBut *ui_but_change_type(uiBut *but, eButType new_type)
const bool found_layout = ui_layout_replace_but_ptr(but->layout, old_but_ptr, but);
BLI_assert(found_layout);
UNUSED_VARS_NDEBUG(found_layout);
+ ui_button_group_replace_but_ptr(but->layout, old_but_ptr, but);
}
}
}