[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56229] trunk/blender/source/blender/ editors/interface/interface_regions.c: fix for UI annoyance with popups ( such as new image popup) opening their menus to the right of the button.

Campbell Barton ideasman42 at gmail.com
Tue Apr 23 00:32:43 CEST 2013


Revision: 56229
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56229
Author:   campbellbarton
Date:     2013-04-22 22:32:42 +0000 (Mon, 22 Apr 2013)
Log Message:
-----------
fix for UI annoyance with popups (such as new image popup) opening their menus to the right of the button.

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

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_regions.c	2013-04-22 22:20:38 UTC (rev 56228)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c	2013-04-22 22:32:42 UTC (rev 56229)
@@ -2440,7 +2440,11 @@
 	pup->block = uiBeginBlock(C, NULL, __func__, UI_EMBOSSP);
 	pup->block->flag |= UI_BLOCK_NUMSELECT;  /* default menus to numselect */
 	pup->layout = uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
-	pup->slideout = (but && (but->block->flag & UI_BLOCK_LOOP));
+	pup->slideout = (but &&
+	                 /* check this is a menu */
+	                 ((but->block->flag & UI_BLOCK_LOOP) != 0) &&
+	                 /* non-menu popups use keep-open, so check this is off */
+	                 ((but->block->flag & UI_BLOCK_KEEP_OPEN) == 0));
 	pup->but = but;
 	uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
 




More information about the Bf-blender-cvs mailing list