Revision: 42519
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42519
Author:   blendix
Date:     2011-12-08 20:24:01 +0000 (Thu, 08 Dec 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-12-08 19:16:43 UTC (rev 42518)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2011-12-08 20:24:01 UTC (rev 42519)
@@ -5241,11 +5241,14 @@
 
        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 */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to