Fixed scaling of mouse position for mouse wheel event handling in imgui on Retina monitors
This commit is contained in:
parent
3ec057bef7
commit
38e883a66e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user