Page MenuHome

Arrow keys work in the opposite direction to the expected when browsing collections
Closed, ResolvedPublic


System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.91

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-06-07 18:51, hash: rB4fb441517251
Worked: (optional)

Short description of error
When you move an object to a collection that is inside another collection and you try to use the arrow keys its direction up / down are inverted
Tested on Windows and Mac

Exact steps for others to reproduce the error
1.- Open the default Blender file
2.- Create a new collection (let's call it "TestCol") within the existing one
3.- Select the cube and press M to see the context menu
4.- In this first menu the arrows up / down work well, but now when you expand the inside of the Collection you will see 3 options: Collection / TestCol / + New Collection.
5.- If within that menu you try to navigate with the up / down arrows, direction will be reversed.

Event Timeline

@Dalai Felinto (dfelinto) you are the author of the "Move to Collection" operator (rBf167226b).
I don't know if it is the best solution, but this seems to solve the problem very well:

diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 8ccd35051c6..4f1154c02e3 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1604,6 +1604,7 @@ static void move_to_collection_menu_create(bContext *UNUSED(C), uiLayout *layout
   MoveToCollectionData *menu = menu_v;
   const char *name = BKE_collection_ui_name_get(menu->collection);
+  UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
   uiItemIntO(layout, name, ICON_NONE, menu->ot->idname, "collection_index", menu->index);
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.Jun 9 2019, 9:58 PM

Some bugs are just weird. @Germano Cavalcante (mano-wii) let me look at it, we may as well create the elements in the proper order. Otherwise I will try your approach.