diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-14 19:40:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-14 19:42:31 +0400 |
commit | ea2043eb3a31468d9afeb1d6cc140567e219565f (patch) | |
tree | 7509c73176efae489bb4aab3a8daadb755007015 /source/blender/editors/util/undo.c | |
parent | 5713d80804de8795a59fc04e95af3f50617adcfa (diff) |
UI: Add support for popups to refresh their layput (D578)
This is needed for popups to chance state once activated,
currently it makes use of operators `check` callback, after values are modified,
as the file selector does already.
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index ee02e0c396a..458b6e1b481 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -385,7 +385,13 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) ED_undo_pop_op(C, op); if (op->type->check) { - op->type->check(C, op); /* ignore return value since its running again anyway */ + if (op->type->check(C, op)) { + /* check for popup and re-layout buttons */ + ARegion *ar_menu = CTX_wm_menu(C); + if (ar_menu) { + ED_region_tag_refresh_ui(ar_menu); + } + } } retval = WM_operator_repeat(C, op); |