Ticket #42288

gtk3.22 : press 'c' to center focus is sometimes wrong

Open Date: 2021-05-15 22:09 Last Update: 2023-06-03 07:37

5 - Medium
5 - Medium


i have found a reproducible case, on S3_0 and S3_1

Skip several units to have active unit = transporter near Tuwanuwa

Depending on where is the starting pont, the center can be good or bad.

I have it wrong systematically if i move the screen far to the left of the boat.

Attached a saved game, and two screenshots, before and after to show the problem.

Ticket History (3/16 Histories)

2021-05-15 22:09 Updated by: alain_bkr
  • New Ticket "gtk3.22 : press 'c' to center focus is sometimes wrong" created
2021-05-15 22:24 Updated by: chippo

I've seen this often. Pressing 'c' again sorts it out. In fact, I got so used to it before I started reporting bugs, that I didn't see it as a bug anymore.

2021-05-15 22:41 Updated by: alain_bkr

Yes workaround is easy, but it gives really bad fealing in gamepalay-experience

And a bug might hide another. I believe it is linked to #42175

tiles are hexagonal

(Edited, 2021-05-16 04:05 Updated by: alain_bkr)
2021-05-16 21:19 Updated by: andrewmcg

I see this frequently too, gtk3.22 with hex tiles

2022-05-03 21:05 Updated by: alain_bkr

The same problem (center screen not on the supposed tile) occurs also when contact an unknown nation, and 'got to ' the place (i dont remember if it was from popup message, or from F9 double click on the event

Attached a screenshot, obviously wrong. In that case it was easy to see, and find the new nation, but it may be much harder on land with many countries.

2022-06-28 22:54 Updated by: cazfi

Another hint to support debugging (or to lead one to wrong track, if it's not related after all). On gtk4-client development I've now seen cases where the screen has already been correctly centered initially, but has then recentered about half a screen to the left.

2022-11-28 11:25 Updated by: cazfi

In gtk4-client development similar effect seen also when selecting centering to unit in citydlg supported units context menu.

2023-04-07 21:06 Updated by: alain_bkr

3.1 client gtk3.22

(if needed i confirm i have not seen this problem with qt client, so it is quite surely a client-gtk problem :-)

I can reproduce the bug from a saved game with a small map :

  • one island , with WRAPX , hex, iso (flattop tiles)
  • focus is centered on Stokholm (right of the island )
  • next unit is on the left of the island
  • press C, then the center of the screen goes in the middle of the sea, near the "meridian 0" where coordinates jump due to the wrap : (30,7) has for neighbor on right (6,30) and (7,31)

It depends on the window size, the bug may not show up if i reduce window's width.

2023-06-03 07:37 Updated by: cazfi

A bit related bug I found while trying to reproduce this by alain_bkr's instructions: #48150

Attachment File List


You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login