diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-07 00:31:11 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-07 00:31:11 +0400 |
commit | d2f95ea72ec1824ef06986c5adaca7c0abc36a48 (patch) | |
tree | 98de58c16f02efee4e18f1271a6b264309e32607 /source | |
parent | c8fadc65dc4bdbb02f174048b02562c852feb4b9 (diff) |
bug fix 1009
Arrow keys to select items were flipped for button type MENU.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/interface.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index 81808d8789f..f9801a85326 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -813,7 +813,8 @@ static void ui_warp_pointer(short x, short y) static int ui_do_but_MENU(uiBut *but) { uiBlock *block; - ListBase listb={NULL, NULL}; + uiBut *bt; + ListBase listb={NULL, NULL}, lb; double fvalue; int width, height=0, a, xmax, starty; short startx; @@ -906,6 +907,20 @@ static int ui_do_but_MENU(uiBut *but) } } + /* the code up here has flipped locations, because of change of preferred order */ + /* thats why we have to switch list order too, to make arrowkeys work */ + + lb.first= lb.last= NULL; + bt= block->buttons.first; + while(bt) { + uiBut *next= bt->next; + BLI_remlink(&block->buttons, bt); + BLI_addhead(&lb, bt); + bt= next; + } + block->buttons= lb; + + /* and lets go */ block->direction= UI_TOP; ui_positionblock(block, but); block->win= G.curscreen->mainwin; @@ -4029,6 +4044,7 @@ void uiBlockSetDirection(uiBlock *block, int direction) { block->direction= direction; } + void uiBlockFlipOrder(uiBlock *block) { ListBase lb; |