mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Fixed scaling of mouse position for mouse wheel event handling in imgui on Retina monitors
This commit is contained in:
@@ -3348,17 +3348,17 @@ void GLCanvas3D::on_mouse_wheel(wxMouseEvent& evt)
|
||||
if (evt.MiddleIsDown())
|
||||
return;
|
||||
|
||||
if (wxGetApp().imgui()->update_mouse_data(evt)) {
|
||||
m_dirty = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#if ENABLE_RETINA_GL
|
||||
const float scale = m_retina_helper->get_scale_factor();
|
||||
evt.SetX(evt.GetX() * scale);
|
||||
evt.SetY(evt.GetY() * scale);
|
||||
#endif
|
||||
|
||||
if (wxGetApp().imgui()->update_mouse_data(evt)) {
|
||||
m_dirty = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// For some reason the Idle event is not being generated after the mouse scroll event in case of scrolling with the two fingers on the touch pad,
|
||||
// if the event is not allowed to be passed further.
|
||||
|
||||
Reference in New Issue
Block a user