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);