Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

248/252 Improve RIT and Bandwidth adjustment using mouse wheel #253

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -971,13 +971,15 @@ procedure TMainForm.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
begin
if GetKeyState(VK_CONTROL) >= 0 then IncRit(1)
else if RunMode <> rmHst then SetBw(ComboBox2.ItemIndex-1);
Handled := true; // set Handled to prevent being called 3 times
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has been applied in many forks over time. However, none of them had detected or fixed the problem of multiple events being handled for a single mouse wheel click/movement. By setting Handled=true, only one event is handled. This was important for smooth operation of Bandwidth control using the Cntl-key.

end;

procedure TMainForm.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
begin
if GetKeyState(VK_CONTROL) >= 0 then IncRit(-1)
else if RunMode <> rmHst then SetBw(ComboBox2.ItemIndex+1);
Handled := true; // set Handled to prevent being called 3 times
end;


Expand Down