[Bf-blender-cvs] [9137a44] master: Fix T47185: Wrong items order with template_icon_view.

Bastien Montagne noreply at git.blender.org
Fri Jan 15 15:20:07 CET 2016


Commit: 9137a4401440d3f3206e989f49f3539079d685b8
Author: Bastien Montagne
Date:   Fri Jan 15 15:19:14 2016 +0100
Branches: master
https://developer.blender.org/rB9137a4401440d3f3206e989f49f3539079d685b8

Fix T47185: Wrong items order with template_icon_view.

===================================================================

M	source/blender/editors/interface/interface_templates.c

===================================================================

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index bda84fe..ccb0c9f 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1636,7 +1636,7 @@ static uiBlock *ui_icon_view_menu_cb(bContext *C, ARegion *ar, void *arg_litem)
 	h = UI_UNIT_X * (args.icon_scale + args.show_labels);
 
 	block = UI_block_begin(C, ar, "_popup", UI_EMBOSS_PULLDOWN);
-	UI_block_flag_enable(block, UI_BLOCK_LOOP);
+	UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_NO_FLIP);
 
 	RNA_property_enum_items(C, &args.ptr, args.prop, &item, NULL, &free);
 
@@ -1644,7 +1644,7 @@ static uiBlock *ui_icon_view_menu_cb(bContext *C, ARegion *ar, void *arg_litem)
 		int x, y;
 
 		x = (a % 8) * w;
-		y = (a / 8) * h;
+		y = -(a / 8) * h;
 
 		icon = item[a].icon;
 		value = item[a].value;




More information about the Bf-blender-cvs mailing list