The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: wlindley on August 14, 2021, 12:48:11 PM

Title: Cursor misalignment
Post by: wlindley on August 14, 2021, 12:48:11 PM
Sometime in the past several weeks, the new builds have resulted in a misalignment of the cursor.  In this screenshot, the mouse cursor was at the location shown by the ✭ but the outlined (selected) tile is to the lower-left, and the highlighted-background icon is one "height level" above that.
Any idea what has gone wrong?  This is quite frustrating to use.
Title: Re: Cursor misalignment
Post by: jamespetts on August 14, 2021, 12:50:18 PM
I must confess, I am having some trouble in reproducing this.
Title: Re: Cursor misalignment
Post by: RealAmerican1776 on August 14, 2021, 02:17:02 PM
I have the same issue. If you zoom in, the cursor will realign itself and zoom on where the cursor's suppose to be.
Title: Re: Cursor misalignment
Post by: prissi on August 14, 2021, 02:57:38 PM
THat happens in standard as well. Unfortunately zooing out or moving the map slight ly resets this and makes it hard to reproduce.
Title: Re: Cursor misalignment
Post by: Roboron on August 14, 2021, 03:32:00 PM
0 - Starting at a zoom level with no issue.
1 - I zoom in. Cursor misaligned to the top.
2 - I zoom in again. Cursor misaligned to the top.
3 - I zoom in again. Now cursor is on the right place, but the outline is misaligned to the top (see image).
4 - I zoom in again (max zoom). Same as 3.

Moving the map does not fix it, I have to go back to 0. But it also happens to me that moving the cursor leaves artifacts on the terrain.

(https://i.imgur.com/gcwXhhV.png)
Title: Re: Cursor misalignment
Post by: Matthew on August 14, 2021, 06:22:37 PM
I also experience this, just as described by Roboron. Perhaps worth noting that I am using Linux, in case this is somehow OS-specific.
Title: Re: Cursor misalignment
Post by: ceeac on August 14, 2021, 07:48:08 PM
So far, I've found that the bug happens on r9982 and up, but only when multi-threaded.
Title: Re: Cursor misalignment
Post by: prissi on August 15, 2021, 01:07:20 AM
That was super helpful. Fixed in r10010. The width for the calculation needs to be the full display width, not the width of the stripe to be just shown.