Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submenus with same name get merged [Bug] #27

Open
seb303 opened this issue Nov 8, 2022 · 4 comments
Open

Submenus with same name get merged [Bug] #27

seb303 opened this issue Nov 8, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@seb303
Copy link

seb303 commented Nov 8, 2022

Describe the bug
If submenus in different parts of the menu tree happen to have the same name, all items get merged and show up in both places

To Reproduce

/Test1

Item1
Item1

//Subfolder

Item2
Item2

..

/Test2

Item3
Item3

//Subfolder

Item4
Item4

..

Expected behavior
Subfolder under Test1 should contain only Item2, and Subfolder under Test2 should contain only Item4. Current behaviour is that both items show up in both places.

System
Windows 10
Live 11
LES Release 1.3.5

@seb303 seb303 added the bug Something isn't working label Nov 8, 2022
@seb303 seb303 changed the title Subfolders with same name get merged [Bug] Submenus with same name get merged [Bug] Nov 8, 2022
@enoversum
Copy link

enoversum commented Jan 22, 2023

@seb303 Yeah, that's definitely happening. One way to avoid this is inserting a space into the name, e.g. in the beginning or the end. I'm using emotions right at the beginning for menus and submenus, e.g. '📂Category name', so I insert a space more if I have the same sub-group in another context again. Not a solution to the bug, but a workaround after all.

@Inversil
Copy link
Member

Ah yeah, the reason for this is a problem in the dynamic menu parser/compiler. Autohotkey uses variable names to keep track of submenus, and if two submenus get assigned the exact same name, I guess they overlap in some way. It shouldn't happen because I remember trying to avoid that... but I suppose it does anyway. The only solution I could think of is adding a routine that checks for this exact scenario- but I don't really know how to check for the existence of a sub-menu in the middle of the routine.

@enoversum
Copy link

enoversum commented Apr 23, 2023

@Inversil Thanks for getting back to this bug. It's not a huge problem for me, and I could circumvent it by adding the aforementioned spaces to the name of the folder. Those are not visible in the menu, but separate the 'duplicates' from each other. It might just be good to have some kind of warning for users somewhere in the docs.

@seb303
Copy link
Author

seb303 commented Apr 23, 2023

If I remember correctly, the problem also occurs if a top level menu has the same name as a sub menu. The workaround to add spaces on the end of the names is ok for me too. So I guess a good enough fix would be just to document this workaround.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants