Bugfixes (#2)

* Bugfixes

* Reduce size of diff

to avoid merge conflicts when we cherry-pick from upstream :)

* remove extraneous space

---------

Co-authored-by: Andrew Sun <as-com@users.noreply.github.com>
This commit is contained in:
Kiss Lorand
2025-11-19 02:50:48 +02:00
committed by GitHub
parent 2440d669f0
commit a87df7f0b5
7 changed files with 42 additions and 84 deletions

View File

@@ -1468,6 +1468,8 @@ void IMSlider::on_mouse_wheel(wxMouseEvent& evt) {
return;
}
ImGuiWrapper& imgui = *wxGetApp().imgui();
float wheel = 0.0f;
wheel = evt.GetWheelRotation() > 0 ? 1.0f : -1.0f;
if (wheel == 0.0f)
@@ -1492,6 +1494,7 @@ void IMSlider::on_mouse_wheel(wxMouseEvent& evt) {
const int new_pos = GetHigherValue() + wheel;
SetHigherValue(new_pos);
set_as_dirty();
imgui.set_requires_extra_frame();
}
}
else {
@@ -1509,6 +1512,7 @@ void IMSlider::on_mouse_wheel(wxMouseEvent& evt) {
m_selection == ssLower ? SetLowerValue(new_pos) : SetHigherValue(new_pos);
}
set_as_dirty();
imgui.set_requires_extra_frame();
}
}
}