mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 08:17:51 -06:00
* gui: reverse mouse zoom option (#4668) Add configuration entry for reverse mouse zoom option Define SUPPORT_REVERSE_MOUSE_ZOOM macro to enable feature code. * remove SUPPORT_REVERSE_MOUSE_ZOOM macro --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
ff7faca943
commit
14fc48ffbd
3 changed files with 3 additions and 7 deletions
|
@ -3685,11 +3685,7 @@ void GLCanvas3D::on_mouse_wheel(wxMouseEvent& evt)
|
|||
return;
|
||||
}
|
||||
// Calculate the zoom delta and apply it to the current zoom factor
|
||||
#ifdef SUPPORT_REVERSE_MOUSE_ZOOM
|
||||
double direction_factor = (wxGetApp().app_config->get("reverse_mouse_wheel_zoom") == "1") ? -1.0 : 1.0;
|
||||
#else
|
||||
double direction_factor = 1.0;
|
||||
#endif
|
||||
double direction_factor = wxGetApp().app_config->get_bool("reverse_mouse_wheel_zoom") ? -1.0 : 1.0;
|
||||
auto delta = direction_factor * (double)evt.GetWheelRotation() / (double)evt.GetWheelDelta();
|
||||
bool zoom_to_mouse = wxGetApp().app_config->get("zoom_to_mouse") == "true";
|
||||
if (!zoom_to_mouse) {// zoom to center
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue