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-16 23:16:44 +0300
committerHans Goudey <h.goudey@me.com>2020-10-16 23:16:44 +0300
commit54da72d3cd546ecbd2560d7d57cbed33064bbee1 (patch)
tree159b897bff233f6357129468de55fe87b0970f6a /source/blender/editors/screen/area.c
parent77aef03d8ade0e147a4a16354bcb33432e3d2f04 (diff)
Property Search: Reset panel expansion when exiting search
This patch implements panel expansion saving and resetting for property search. While search is active, the panel expansion is based on whether or not it has a search result. When the search finishes, the panel expansion returns to its state before the search started. However, any panels interacted with during the search won't reset their expansion. This requires adding a new runtime flag for panels to store whether to use search result status as expansion. It also requires better handling for animation when panel expansion changes with another new runtime flag. `UI_panel_is_closed` gets the search-dependent expansion, but it is intentionally not used to access expansion in every case-- sometimes it's necessary to use `PNL_CLOSED` directly. Differential Revision: https://developer.blender.org/D8984
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r--source/blender/editors/screen/area.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 1a8c74c59b1..b77d3d1100d 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -2970,7 +2970,7 @@ void ED_region_panels_layout_ex(const bContext *C,
Panel *panel = region->panels.last;
if (panel != NULL) {
const int size_dyn[2] = {
- UI_UNIT_X * ((panel->flag & PNL_CLOSED) ? 8 : 14) / UI_DPI_FAC,
+ UI_UNIT_X * (UI_panel_is_closed(panel) ? 8 : 14) / UI_DPI_FAC,
UI_panel_size_y(panel) / UI_DPI_FAC,
};
/* region size is layout based and needs to be updated */