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-10-03 19:25:13 +0300
committerHans Goudey <h.goudey@me.com>2020-10-03 19:25:13 +0300
commitcb6234fccf7dfd3e09555cac18357427d802be1d (patch)
tree7d7b97232f84b0cce218e7b8635032ed67875eb5 /source/blender/editors/include
parent724370b2f9727c007b911c036183b844dbc2ab59 (diff)
Property Search: Set panel expansion when tab changes
This commit makes the panel expansion set based on the search results when the active tab in the properties editor changes. The multi-tab search patch (D8859) actually doesn't handle this because it uses a different code path. This feature uncovered a subtle but fairly significant issue with the implementation of property search (More details in T81113). Basically, the search needed multiple redraws to properly display the expansion of panels based on the search results. Because there is no animation of panel expansion when switching tabs, the problem was exposed only now. With this commit, hiding of "search only" buttons and panel size calculation happens in a single final step of the panel layout pass. The "search only" layout root flag is removed. Instead every button inside a panel header is in a single "uiButtonGroup" marked with a specific "in header" flag, an idea which could be generalized in the future. Differential Revision: https://developer.blender.org/D9006
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 972c741f061..cac18d81f56 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1683,14 +1683,15 @@ struct Panel *UI_panel_begin(struct ARegion *region,
struct PanelType *pt,
struct Panel *panel,
bool *r_open);
-void UI_panel_end(const struct ARegion *region, uiBlock *block, int width, int height, bool open);
+void UI_panel_header_buttons_begin(struct Panel *panel);
+void UI_panel_header_buttons_end(struct Panel *panel);
+void UI_panel_end(struct Panel *panel, int width, int height);
bool UI_panel_is_active(const struct Panel *panel);
void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y);
int UI_panel_size_y(const struct Panel *panel);
bool UI_panel_is_dragging(const struct Panel *panel);
bool UI_panel_matches_search_filter(const struct Panel *panel);
-void UI_panels_set_expansion_from_seach_filter(const struct bContext *C, struct ARegion *region);
bool UI_panel_category_is_visible(const struct ARegion *region);
void UI_panel_category_add(struct ARegion *region, const char *name);
@@ -1922,7 +1923,6 @@ float uiLayoutGetUnitsY(uiLayout *layout);
int uiLayoutGetEmboss(uiLayout *layout);
bool uiLayoutGetPropSep(uiLayout *layout);
bool uiLayoutGetPropDecorate(uiLayout *layout);
-void uiLayoutRootSetSearchOnly(uiLayout *layout, bool search_only);
/* layout specifiers */
uiLayout *uiLayoutRow(uiLayout *layout, bool align);