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:
authorJulian Eisel <julian@blender.org>2020-05-12 21:30:15 +0300
committerJulian Eisel <julian@blender.org>2020-05-12 21:40:56 +0300
commit36e3847093546232db3f16da9189ab7f30207126 (patch)
tree820a3d6dc44df18e2843365be7c40778f5eefa75 /source/blender/editors/include/UI_interface.h
parentfc59febb1b30f390e733e1c775b93d128dd84e34 (diff)
Fix T76635: Clicking the text button X in a pop-up doesn't clear
In this case giving `CTX_wm_menu()` priority over `CTX_wm_region()` is all that's needed and makes sense (since we want exactly the hovered button, not some other active button in the region/menu hierarchy). The situation with pop-ups is still tricky, see T73565. But as a first step it's probably good to let functions be more explicit about what they want when querying UI context. So I added a variation of a UI-context function for cases like this.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 8c591a2d0d4..8b7b0430765 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -2411,6 +2411,7 @@ bool UI_context_copy_to_selected_list(struct bContext *C,
/* Helpers for Operators */
uiBut *UI_context_active_but_get(const struct bContext *C);
+uiBut *UI_context_active_but_get_respect_menu(const struct bContext *C);
uiBut *UI_context_active_but_prop_get(const struct bContext *C,
struct PointerRNA *r_ptr,
struct PropertyRNA **r_prop,