[BUG][EDITOR] Navigating dropdown menus with the mousewheel has side effects

Started by Dullstar, September 21, 2020, 09:33:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dullstar

Found in v1.27, but at least quickly checking in older versions of the editor from installations of older versions (since I usually make a fresh installation each major player version), it's been present since at least v1.11, and is probably even older than that.

It appears to occur with any dropdown menu, as the style selector, music selector, and theme selector all appear to be affected.

OS: Windows 10

Loading a large level before attempting to reproduce is not necessary, but may help to visualize the issues more easily.

Issue 1:
To reproduce:
Load or create any level with a minimum size such that you can scroll the level vertically (you can zoom in to accomplish this). Having terrain and/or objects present in the level will help to visualize the issue, but is not required. Make sure no objects or terrain are currently selected.
Now, hover the mouse over the style selector/music selector/theme selector and use the mouse wheel to change the selected option.
Expected Result: The next option in the dropdown menu should be selected.
Actual Result: In addition to the expected result, the level will also scroll in the direction the mouse wheel is moved. Note that is the same scrolling behavior that occurs if the mouse is hovering over the vertical scrollbar on the right side of the screen. Every other mouse hover location I thought of to try using the mouse wheel either zoomed the level or did nothing (except the horizontal scrollbar, which behaves properly).

Issue 2:
To reproduce:
Load or create any level with at least one terrain piece or object, and select at least one terrain piece and/or object placed within the level.
Now, hover the mouse over the style selector/music selector/theme selector and use the mouse wheel to change the currently selected option.
Expected Result: The next option in the dropdown menu should be selected.
Actual Result: In addition to the expected result, the terrain pieces/objects will be moved in the direction of the scroll wheel. This particularly seems strange because there doesn't seem to be any other circumstance under which the scroll wheel can be used to move terrain/objects.

Note that clicking on the dropdown menu and then scrolling through it with the mouse wheel does not trigger this bug.

namida

Can reproduce, but I've barely even looked at the code that handles this - I would've thought it was all just plain form events, but seems there's some unusual stuff going on. Not too sure how likely a fix is on this one.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)