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

Remove unnecessary clamping checks #1285

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Remove unnecessary clamping checks #1285

merged 1 commit into from
Sep 29, 2023

Conversation

argilo
Copy link
Member

@argilo argilo commented Sep 29, 2023

Clamping was removed from xFromFreq in #1248. There are a few places in the plotter that explicitly checked for clamping to avoid drawing elements against the edge of the window when xFromFreq clamped their X coordinate. These checks are no longer necessary, since the clamping is no longer present.

In cases where the drawn elements are completely outside the visible area, Qt will simply not draw them.

@argilo argilo added the cleanup label Sep 29, 2023
@argilo
Copy link
Member Author

argilo commented Sep 29, 2023

A nice side effect of this change is that A/B marker heads remain visible even when the lines are slightly off-screen.

@argilo
Copy link
Member Author

argilo commented Sep 29, 2023

The diff is easier to review with whitespace changes omitted: https://github.com/gqrx-sdr/gqrx/pull/1285/files?w=1

@argilo argilo merged commit c97ce74 into master Sep 29, 2023
22 checks passed
@argilo argilo deleted the drop-clamping-checks branch September 29, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants