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

zoom bug-fix #317

Closed
DorpsGek opened this issue Aug 31, 2006 · 2 comments
Closed

zoom bug-fix #317

DorpsGek opened this issue Aug 31, 2006 · 2 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

GrimRC opened the ticket and wrote:

There is a minor bug in the code to zoom out using the mouse scrollwheel. It is triggered when the player tries to zoom out a viewport with the scrollwheel, when the view is at the very edge of the map.

When zooming out, the function GetTileZoomCenterWindow() tries to centre the (new, zoomed-out) view on a particular tile such that the mouse cursor (which does not move) is still over the same tile as before the zoom occured. When the view is centred on the edge of the map, the function tries to centre on a position lying outside of the map, and no tile satisfies this position. Previously, TranslateXYToTileCoord(), which is called by GetTileZoomCenterWindow(), returned with a failure code and the view refused to zoom out until it was recentred on a tile deeper within the map.

This patch modifies TranslateXYToTileCoord() to respond to an invalid request from GetTileZoomCenterWindow() with a reasonable approximation of the tile requested, so the view can still zoom out, roughly where GetTileZoomCentreWindow() wanted.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/317
@DorpsGek
Copy link
Member Author

GrimRC wrote:

An improved patch! Thanks to rubidium!

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/317#comment481

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 3, 2006

Darkvater closed the ticket.

Reason for closing: Implemented

r7047


This comment was imported from FlySpray: https://bugs.openttd.org/task/317

@DorpsGek DorpsGek closed this as completed Nov 3, 2006
@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant