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

Constrain zoom levels #4809

Merged
merged 5 commits into from
May 30, 2024

Conversation

kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented May 28, 2024

Identify the Bug or Feature request

Fixes #2264

Description of the Change

The zoom level has been clamped to a more reasonable range.

  • Minimum level: -175, or 0.0003%
  • Maximum level: 175, or 31,367,597%

These numbers aren't very meaningful aside from avoiding the extremes while still giving lots of freedom. There's a bit of room on each side yet if we want to push it.

The AdjustGridPanel and AdvancedAdjustGridPanel were removed as they were unused and put extra requirements on Scale.

Possible Drawbacks

None

Documentation Notes

N/A

Release Notes

  • Fixed a bug where the viewport would suddenlty jump when zooming in really far.

This change is Reviewable

The scale and zoom level can never vary independently. The copy constructor and readResolve() now enforce the zoom level
being calculated from the scale.

Also includes a bunch of clean up for unused fields.
Minimum is still -175, there's just no reason they have to be the same.
We were passing 4 (`RIGHT`) as the number of column rather than the alignment. This has been fixed, and the column count
bumped up to 9.

With the extra space, we now format the numbers to always display 5 digits.
@kwvanderlinde kwvanderlinde self-assigned this May 28, 2024
@cwisniew
Copy link
Member

cwisniew commented May 30, 2024

Approved although I wonder about your definition of "reasonable" for the range :)

@cwisniew cwisniew added this pull request to the merge queue May 30, 2024
Merged via the queue into RPTools:develop with commit 68ad10c May 30, 2024
5 checks passed
@kwvanderlinde kwvanderlinde deleted the bugfix/2264-rein-in-infinity branch June 28, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Zooming to high values creates graphical artifacts
2 participants