#4395, #4701, #1336 - Added the ability to invert the scroll wheel when zooming

This commit is contained in:
enricoturri1966 2020-11-02 13:08:13 +01:00
parent 516db43b20
commit 9dbc0c6ba2
3 changed files with 16 additions and 2 deletions

View file

@ -3399,7 +3399,8 @@ void GLCanvas3D::on_mouse_wheel(wxMouseEvent& evt)
return;
// Calculate the zoom delta and apply it to the current zoom factor
_update_camera_zoom((double)evt.GetWheelRotation() / (double)evt.GetWheelDelta());
double direction_factor = (wxGetApp().app_config->get("reverse_mouse_wheel_zoom") == "1") ? -1.0 : 1.0;
_update_camera_zoom(direction_factor * (double)evt.GetWheelRotation() / (double)evt.GetWheelDelta());
}
void GLCanvas3D::on_timer(wxTimerEvent& evt)