fix [#26436] Operator.draw(): UI redraw; UI trimmed

This commit is contained in:
2011-03-10 22:22:47 +00:00
parent d6b43fed31
commit ef8aa6cc6a

View File

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