Revision: 25368
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25368
Author:   blendix
Date:     2009-12-14 15:34:57 +0100 (Mon, 14 Dec 2009)

Log Message:
-----------
Bugfix: clicking outside of color picker could reset color in some cases.

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 
2009-12-14 14:27:38 UTC (rev 25367)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 
2009-12-14 14:34:57 UTC (rev 25368)
@@ -4739,9 +4739,14 @@
                        if(inside==0) {
                                uiSafetyRct *saferct= block->saferct.first;
 
-                               if(ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, 
RIGHTMOUSE) && event->val==KM_PRESS)
-                                       if(saferct && 
!BLI_in_rctf(&saferct->parent, event->x, event->y))
-                                               menu->menuretval= UI_RETURN_OUT;
+                               if(ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, 
RIGHTMOUSE) && event->val==KM_PRESS) {
+                                       if(saferct && 
!BLI_in_rctf(&saferct->parent, event->x, event->y)) {
+                                               if(block->flag & 
(UI_BLOCK_OUT_1|UI_BLOCK_KEEP_OPEN))
+                                                       menu->menuretval= 
UI_RETURN_OK;
+                                               else
+                                                       menu->menuretval= 
UI_RETURN_OUT;
+                                       }
+                               }
                        }
 
                        if(menu->menuretval);
@@ -4777,10 +4782,10 @@
 
                                        /* strict check, and include the parent 
rect */
                                        if(!menu->dotowards && !saferct) {
-                                               if(block->flag & UI_BLOCK_OUT_1)
+                                               if(block->flag & 
(UI_BLOCK_OUT_1|UI_BLOCK_KEEP_OPEN))
                                                        menu->menuretval= 
UI_RETURN_OK;
                                                else
-                                                       menu->menuretval= 
(block->flag & UI_BLOCK_KEEP_OPEN)? UI_RETURN_OK: UI_RETURN_OUT;
+                                                       menu->menuretval= 
UI_RETURN_OUT;
                                        }
                                        else if(menu->dotowards && 
event->type==MOUSEMOVE)
                                                retval= WM_UI_HANDLER_BREAK;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to