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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-09 00:24:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-09 00:24:01 +0400
commit601b0b284e1ec87917c47341165c111ef5b8d96c (patch)
tree163d8efd5b63c556c4d512ae7af4c3515f7cb328 /source/blender
parent7c630aac80d6326bd5dd569bce343e386123fdac (diff)
Fix for #29475 broke properly updating toggle buttons in popup menus. Tweak the
fix a bit, not a true solution to the problem, but too close to release for bigger changes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_handlers.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c6159487145..aee23626787 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5241,11 +5241,14 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
data->state= state;
- if(!ELEM(state, BUTTON_STATE_EXIT, BUTTON_STATE_HIGHLIGHT)) {
- /* When objects for eg. are removed, running ui_check_but()
- * can access the removed data - so disable update on exit
- * or highlight */
- ui_check_but(but);
+ if(state != BUTTON_STATE_EXIT) {
+ /* When objects for eg. are removed, running ui_check_but() can access
+ the removed data - so disable update on exit. Also in case of
+ highlight when not in a popup menu, we remove because data used in
+ button below popup might have been removed by action of popup. Needs
+ a more reliable solution... */
+ if(state != BUTTON_STATE_HIGHLIGHT || but->block->handle)
+ ui_check_but(but);
}
/* redraw */