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>2009-12-14 17:34:57 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-14 17:34:57 +0300
commit91215df5c2c685d5a9bb219a59901c090c74671e (patch)
tree32e0b518d4bcb41dad9e1462fe26754aebe7a99b /source/blender/editors
parenta5c020218c20a0f6fa7d36131133bae6f7d2f47d (diff)
Bugfix: clicking outside of color picker could reset color in some cases.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_handlers.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 4ef59e4b59a..a43506778d8 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4739,9 +4739,14 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
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 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
/* 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;