Arrow keys work in the opposite direction to the expected when browsing collections #65641

Closed
opened 2019-06-08 16:29:46 +02:00 by Javier Carreras · 6 comments

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: 4fb4415172
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.
Blender-Bug.jpg

**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: `4fb4415172` 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. ![Blender-Bug.jpg](https://archive.blender.org/developer/F7094517/Blender-Bug.jpg)

Added subscriber: @JavierC

Added subscriber: @JavierC

Added subscribers: @dfelinto, @mano-wii

Added subscribers: @dfelinto, @mano-wii
Dalai Felinto was assigned by Germano Cavalcante 2019-06-09 01:07:08 +02:00

@dfelinto you are the author of the "Move to Collection" operator (f167226b).
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);
   uiItemS(layout);
 
@dfelinto you are the author of the "Move to Collection" operator (f167226b). 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); uiItemS(layout); ```

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

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

This issue was referenced by f51de2246c

This issue was referenced by f51de2246c7916e7855421263253bc12a6764a24

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
4 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#65641
No description provided.