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

@ -222,7 +222,7 @@ void ComboBox::mouseWheelMoved(wxMouseEvent &event)
{
event.Skip();
if (drop_down) return;
auto delta = (event.GetWheelRotation() < 0 == event.IsWheelInverted()) ? -1 : 1;
auto delta = event.GetWheelRotation() < 0 ? 1 : -1;
unsigned int n = GetSelection() + delta;
if (n < GetCount()) {
SetSelection((int) n);