News:

Want to praise Simutrans?
Your feedback is important for us ;D.

[Fixed r12179] Mouse-wheel zoom could jump after navigating with the minimap

Started by victor_18993, Yesterday at 05:01:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

victor_18993

Fixed in SVN r12179.

There was a stale-position issue in mouse-wheel zoom after navigating through the minimap.

The minimap changes the main viewport position, but the world cursor position used by the zoom code could still refer to the location from before the minimap jump. As a result, the first mouse-wheel zoom could use that old tile as its anchor and unexpectedly move the viewport far away from the location selected on the minimap.

The wheel zoom now determines its anchor from the current mouse position instead.

Verified on current trunk:

- the original minimap -> close -> first wheel reproducer no longer jumps;
- normal mouse-wheel zoom keeps its existing behaviour;
- invalid/outside-map positions keep the previous guard behaviour;
- mouse-wheel handling inside the minimap is unchanged;
- full automated test suite: 286/286.

Integrated as:

r12179 — FIX: anchor mouse-wheel zoom on the tile under the mouse

This is a local UI/view correction only. There are no network, savegame or pak-format changes.
En la vida todo son vivencias y cada una de ellas nos hace mas grandes,¿Como de grande eres tu? :)