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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2011-11-19 03:10:56 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-11-19 03:10:56 +0400
commit4d31654a617ed5dd49792361e8c1102df25ab563 (patch)
tree3158d667a55281b696b84c5666827b0f908694b2 /source
parent5429a701c4f2674e6fa4c0eef8c285c13e16af0c (diff)
Fix [#29018] Problem with multi-column dorpdown lists, when scrolling is enabled: the bottom-most elements are not shown.
ui_popup_block_scrolltest needs to be aware whether uiblock is flip or not, to avoid hiding irrelevant items in multi-column scrolled menus...
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_regions.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 93e974ddb20..3d94fd4dc56 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1446,6 +1446,8 @@ static void ui_popup_block_clip(wmWindow *window, uiBlock *block)
void ui_popup_block_scrolltest(uiBlock *block)
{
uiBut *bt;
+ /* Knowing direction is necessary for multi-column menus... */
+ int is_flip = (block->direction & UI_TOP) && !(block->flag & UI_BLOCK_NO_FLIP);
block->flag &= ~(UI_BLOCK_CLIPBOTTOM|UI_BLOCK_CLIPTOP);
@@ -1462,9 +1464,9 @@ void ui_popup_block_scrolltest(uiBlock *block)
block->flag |= UI_BLOCK_CLIPBOTTOM;
/* make space for arrow */
if(bt->y2 < block->miny +10) {
- if(bt->next && bt->next->y1 > bt->y1)
+ if(is_flip && bt->next && bt->next->y1 > bt->y1)
bt->next->flag |= UI_SCROLLED;
- if(bt->prev && bt->prev->y1 > bt->y1)
+ else if(!is_flip && bt->prev && bt->prev->y1 > bt->y1)
bt->prev->flag |= UI_SCROLLED;
}
}
@@ -1473,9 +1475,9 @@ void ui_popup_block_scrolltest(uiBlock *block)
block->flag |= UI_BLOCK_CLIPTOP;
/* make space for arrow */
if(bt->y1 > block->maxy -10) {
- if(bt->next && bt->next->y2 < bt->y2)
+ if(!is_flip && bt->next && bt->next->y2 < bt->y2)
bt->next->flag |= UI_SCROLLED;
- if(bt->prev && bt->prev->y2 < bt->y2)
+ else if(is_flip && bt->prev && bt->prev->y2 < bt->y2)
bt->prev->flag |= UI_SCROLLED;
}
}