mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-25 17:15:45 +08:00
Don't allow Ctrl+mouse wheel zooming in the map
Still allow scrolling using just the mouse wheel.
This commit is contained in:
@@ -982,6 +982,15 @@ public:
|
||||
HandleMouseClick(event);
|
||||
});
|
||||
|
||||
Bind(wxEVT_MOUSEWHEEL, [this](wxMouseEvent& event) {
|
||||
// Don't allow zooming into the map.
|
||||
if ( event.ControlDown() )
|
||||
return;
|
||||
|
||||
// But do allow to scroll in it using the wheel.
|
||||
event.Skip();
|
||||
});
|
||||
|
||||
Bind(wxEVT_MOUSE_CAPTURE_LOST, [this](wxMouseCaptureLostEvent& WXUNUSED(event)) {
|
||||
DoStopDragging();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user