Closed YttriumNitrate closed 4 years ago
Yeah ... I dont have a mouse like that so not much i can do.
Yeah I used to think it was happening because I couldn't keep the mouse wheel still while panning but I tested some more and caught it zooming after I had started to pan and was holding the wheel down perfectly still. So yeah it's probably a good idea to just not allow zoom while the wheel is down. That's an easy 1 line of code fix.
I also see a Magnify event in the code that can trigger zoom. I don't think I added that so I'm thinking it was to support a Mac Trackpad action. So we'll just have to see if my change fixes or breaks anything...lol.
Panning is done by holding down the middle mouse button, and zoom is generally done by rotating the mouse wheel forwards and backwards. However, some mice also have left-scroll / right-scroll where the wheel is pushed left or right. In xLights, any one of those three scroll functions causes the view to be zoomed.
This causes problems when users press down the middle button to pan because they will often not press down perfectly straight resulting in the left/right scroll functions also being activated. The end result is that xLights appears to wildly zoom whenever a user is panning.
Other modeling programs, such as Blender and SketchUp, address this issue by disabling zoom when the view is being panned. Limiting the zoom functionality to just the scroll function instead of left/right scroll would probably also work.