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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-20 14:40:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-20 15:10:34 +0300
commita1addc5c633d4c35eeb491c698052ec9300271dc (patch)
tree2f8cf2086db19233c3e641662f8a3cd540a5fd1e /source/blender/windowmanager
parent69fb859909c8e99a8e5e9e06607992d5b9a41473 (diff)
UI: support for popups starting with buttons activated
While this could already be done from C, this is now exposed to Python
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index ac7d496ea35..979473cf761 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1154,6 +1154,8 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
/* center around the mouse */
UI_block_bounds_set_popup(block, 4, (const int[2]){data->width / -2, data->height / 2});
+ UI_block_active_only_flagged_buttons(C, ar, block);
+
return block;
}
@@ -1179,6 +1181,8 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
UI_block_bounds_set_popup(block, 4, NULL);
+ UI_block_active_only_flagged_buttons(C, ar, block);
+
return block;
}