Revision: 20834 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20834 Author: ton Date: 2009-06-12 17:11:51 +0200 (Fri, 12 Jun 2009)
Log Message: ----------- 2.5 Fix for new picker: mouse move out of menu was handled as restore... added new block flag UI_BLOCK_OUT_1 to denote it shouldn't. Modified Paths: -------------- branches/blender2.5/blender/source/blender/editors/include/UI_interface.h branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c Modified: branches/blender2.5/blender/source/blender/editors/include/UI_interface.h =================================================================== --- branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2009-06-12 14:48:11 UTC (rev 20833) +++ branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2009-06-12 15:11:51 UTC (rev 20834) @@ -91,6 +91,7 @@ #define UI_BLOCK_MOVEMOUSE_QUIT 128 #define UI_BLOCK_KEEP_OPEN 256 #define UI_BLOCK_POPUP 512 +#define UI_BLOCK_OUT_1 1024 /* uiPopupBlockHandle->menuretval */ #define UI_RETURN_CANCEL 1 /* cancel all menus cascading */ Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c 2009-06-12 14:48:11 UTC (rev 20833) +++ branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c 2009-06-12 15:11:51 UTC (rev 20834) @@ -3812,8 +3812,12 @@ } /* strict check, and include the parent rect */ - if(!menu->dotowards && !saferct) - menu->menuretval= (block->flag & UI_BLOCK_KEEP_OPEN)? UI_RETURN_OK: UI_RETURN_OUT; + if(!menu->dotowards && !saferct) { + if(block->flag & UI_BLOCK_OUT_1) + menu->menuretval= UI_RETURN_OK; + else + menu->menuretval= (block->flag & UI_BLOCK_KEEP_OPEN)? UI_RETURN_OK: UI_RETURN_OUT; + } else if(menu->dotowards && event->type==MOUSEMOVE) retval= WM_UI_HANDLER_BREAK; } Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c =================================================================== --- branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c 2009-06-12 14:48:11 UTC (rev 20833) +++ branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c 2009-06-12 15:11:51 UTC (rev 20834) @@ -1792,7 +1792,7 @@ } else { uiBlockPickerSmall(block, handle->retvec, hsvcol, oldcol, hexcol, 'p', 0); - block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1; + block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_OUT_1; uiBoundsBlock(block, 10); block->block_event_func= ui_picker_small_wheel; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs