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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-06-25 13:33:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-25 13:33:35 +0400
commit0529766f32b70f38d4089297c8b5e86b964de289 (patch)
tree33d5ab9bb32112b6e4a3409ca869ab277750b7b3 /source/blender/editors/interface
parent833c03791fd197c3ce9eca46307f6b06ade6e502 (diff)
Use api function for flipping button list & rename to BLI_listbase_reverse
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0f4bba8d29b..98e4fa2505f 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3791,8 +3791,7 @@ void uiBlockSetDirection(uiBlock *block, char direction)
/* this call escapes if there's alignment flags */
void uiBlockFlipOrder(uiBlock *block)
{
- ListBase lb;
- uiBut *but, *next;
+ uiBut *but;
float centy, miny = 10000, maxy = -10000;
if (U.uiflag & USER_MENUFIXEDORDER)
@@ -3814,15 +3813,7 @@ void uiBlockFlipOrder(uiBlock *block)
}
/* also flip order in block itself, for example for arrowkey */
- BLI_listbase_clear(&lb);
- but = block->buttons.first;
- while (but) {
- next = but->next;
- BLI_remlink(&block->buttons, but);
- BLI_addtail(&lb, but);
- but = next;
- }
- block->buttons = lb;
+ BLI_listbase_reverse(&block->buttons);
}