待辦事項 #48150

gtk4: Opening "Find City" centers view to a weird place (likely map origin)

啟用日期: 2023-06-03 07:36 最後更新: 2024-03-01 09:42

回報者:
負責人:
類型:
狀態:
開啟 [Owner assigned]
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
檔案:
2

細節

Trying to reproduce #42288 on main branch gtk4-client, I notice that already when I open "Find City" -dialog to find Stockholm, map centers to the middle of the ocean. Presumably this is behavior of the "Find City" -dialog when there's no city selected yet (it doesn't know where to center, but tries anyway), and a separate bug from the 'c' -key issue of #42288

Ticket History (3/10 Histories)

2023-06-03 07:36 Updated by: cazfi
  • New Ticket "gtk4: Opening "Find City" centers view to a weird place (likely map origin)" created
2023-06-03 07:46 Updated by: cazfi
評語

It's weirder than that.

The "Find City" -dialog has "Aarhus" (first in the list) selected automatically, and it actually tries to center to it. "Centering to Aarhus" -problem can be repeated within the "Find City" dialog by selecting some other city (map centering correctly to that city), and then selecting "Aarhus" again (map centers to the middle of the ocean again)

2023-06-03 09:36 Updated by: cazfi
評語

The problem is not that the client would center to a wrong tile. The issue is more with the drawing code that does not redraw the screen correctly. This seems like two bugs interacting - first one would make it not to redraw many parts of the screen that would need to be redrawn, and the second one seems almost like a workaround to the first - it centers to wrong gui coordinates that it can correctly redraw.

I don't fully understand the first one - or rather, I don't see how the current code is even supposed to get the work done. If I can't figure that out, to then understand how to fix it, need to reimplement it completely.

The second one is much easier, and fix to that could be applied selectively to cases where the fix would not trigger bug 1. I think that's going to be the first step.

2023-06-03 10:58 Updated by: cazfi
  • 負責人 Update from (無) to cazfi
  • 處理結果 Update from to Accepted
  • 里程碑 Update from (無) to 3.1.0-beta3 (closed)
評語

Reply To cazfi

The second one is much easier, and fix to that could be applied selectively to cases where the fix would not trigger bug 1. I think that's going to be the first step.

Based on that idea, fix for gtk4-client attached. It's a partial fix for client-common code + makes gtk4-client to always use that working code path.

2023-06-07 12:05 Updated by: cazfi
  • 處理結果 Update from Accepted to
評語

In my testing branch, gtk4-client now sometimes sometimes goes out-of-sync of which parts of the screen get refreshed. That's almost certainly some kind of regression with current version of this patch.

2023-09-16 19:26 Updated by: cazfi
2023-12-29 07:00 Updated by: cazfi
2024-03-01 09:42 Updated by: cazfi

編輯

Please login to add comment to this ticket » 登入