FIX: mouse wheel direction

Change-Id: I7b9a5e300de8e7f0c5a9883a20a18856f79c2b93
This commit is contained in:
chunmao.guo 2022-10-31 09:32:48 +08:00 committed by Lane.Wei
parent dbcdc876ac
commit a52857e95b
3 changed files with 3 additions and 3 deletions

View file

@ -370,7 +370,7 @@ void ImageGrid::resize(wxSizeEvent& event)
void ImageGrid::mouseWheelMoved(wxMouseEvent &event)
{
auto delta = (event.GetWheelRotation() < 0 == event.IsWheelInverted()) ? -1 : 1;
auto delta = event.GetWheelRotation() < 0 ? 1 : -1;
int off = m_row_offset + delta;
if (off >= 0 && off < m_row_count) {
m_row_offset = off;