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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-11 01:22:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-11 01:22:47 +0300
commitef8aa6cc6abcf36b64a96ed79c58f6d708686d39 (patch)
tree9d89d5fb3e217c3f752ccce71fa95bef441ffc1e
parentd6b43fed313b60bb6a269680b3c5622955b8a690 (diff)
fix [#26436] Operator.draw(): UI redraw; UI trimmed
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index b46f5f34271..b7c41052510 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -940,7 +940,6 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData)
wmOperator *op= data->op;
uiBlock *block;
uiLayout *layout;
- uiBut *btn;
uiStyle *style= U.uistyles.first;
block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS);
@@ -956,9 +955,18 @@ static uiBlock *wm_block_create_dialog(bContext *C, ARegion *ar, void *userData)
/* 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);