Fix for centered submenu (for example py export script) also worked

when menu didn't open to left/right but on top/bottom. Caused errors...
This commit is contained in:
2005-03-30 14:17:53 +00:00
parent 9b6febecd3
commit 3fd3728000

View File

@@ -699,8 +699,10 @@ static void ui_positionblock(uiBlock *block, uiBut *but)
/* and now we handle the exception; no space below or to right */
if(top==0 && down==0) {
// align with bottom of screen
yof= ysize;
if(dir1==UI_LEFT || dir1==UI_RIGHT) {
// align with bottom of screen
yof= ysize;
}
}
// apply requested offset in the block