[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35458] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: fix [#26436] Operator.draw(): UI redraw; UI trimmed

Campbell Barton ideasman42 at gmail.com
Thu Mar 10 23:22:48 CET 2011


Revision: 35458
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35458
Author:   campbellbarton
Date:     2011-03-10 22:22:47 +0000 (Thu, 10 Mar 2011)
Log Message:
-----------
fix [#26436] Operator.draw(): UI redraw; UI trimmed

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-03-10 18:56:19 UTC (rev 35457)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2011-03-10 22:22:47 UTC (rev 35458)
@@ -940,7 +940,6 @@
 	wmOperator *op= data->op;
 	uiBlock *block;
 	uiLayout *layout;
-	uiBut *btn;
 	uiStyle *style= U.uistyles.first;
 
 	block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS);
@@ -956,10 +955,19 @@
 	/* clear so the OK button is left alone */
 	uiBlockSetFunc(block, NULL, NULL, NULL);
 
-	/* Create OK button, the callback of which will execute op */
-	btn= uiDefBut(block, BUT, 0, "OK", 0, 0, 0, 20, NULL, 0, 0, 0, 0, "");
-	uiButSetFunc(btn, dialog_exec_cb, op, block);
+	/* new column so as not to interfear with custom layouts [#26436] */
+	{
+		uiBlock *col_block;
+		uiLayout *col;
+		uiBut *btn;
 
+		col= uiLayoutColumn(layout, FALSE);
+		col_block= uiLayoutGetBlock(col);
+		/* Create OK button, the callback of which will execute op */
+		btn= uiDefBut(col_block, BUT, 0, "OK", 0, -30, 0, 20, NULL, 0, 0, 0, 0, "");
+		uiButSetFunc(btn, dialog_exec_cb, op, col_block);
+	}
+
 	/* center around the mouse */
 	uiPopupBoundsBlock(block, 4.0f, data->width/-2, data->height/2);
 	uiEndBlock(C, block);




More information about the Bf-blender-cvs mailing list