待辦事項 #43823

city display doesn't show > 30 workers

啟用日期: 2022-02-08 11:41 最後更新: 2022-02-21 19:50

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
4

細節

3.0.0-RC1 Seen with freeciv-gtk3.22 client, maybe others? Seen with expanded city radius. To repro, use sandbox ruleset, edit effects.ruleset to add

[effect_city_radius_1]
type    = "City_Radius_Sq"
value   = 5

[effect_aqueduct_base]
type    = "Size_Adj"
value   = 40

See screenshot, which was hacked in editing mode. Problem starts when pop > 30, prevents changing specialists.

Ticket History (3/10 Histories)

2022-02-08 11:41 Updated by: ddeanbrown
  • New Ticket "city display doesn't show > 30 workers" created
2022-02-08 11:43 Updated by: ddeanbrown
  • 元件 Update from (無) to Gtk3.22-client
  • Details Updated
2022-02-11 04:40 Updated by: alienvalkyrie
  • 負責人 Update from (無) to alienvalkyrie
  • 里程碑 Update from (無) to 3.0.1 (closed)
評語

Also present in the newer branches, and based on what the code looks like, almost certainly affects all the other gtk clients as well.

I'm not sure if this is the kind of show-stopping bug worth pushing into 3.0.0 directly before release – I would venture a guess and say that at that city size, most people are more likely to use the citizen governor and cities dialog, rather than counting specialists by hand, so it might not be that critical. But I'm open for input.

Note: It doesn't actually prevent changing the specialists, it just doesn't draw them correctly; clicking the empty space does change the specialist correctly (tho ofc it's hard to see what's going on).

The problem most likely stems from a rectangle ending up with negative width – I'm looking into it. It seems like there might be other minor issues with the relevant code as well (such as not drawing the last citizen in full).

2022-02-11 07:10 Updated by: alienvalkyrie
  • 處理結果 Update from to Accepted
評語

Note that not all of these patches are fully tested yet. In particular, I can't currently build the gtk4 clients on my system. However, since the relevant code is literally identical between all seven branch/client combinations, I'd be surprised if any of them don't work correctly.

2022-02-19 03:40 Updated by: alienvalkyrie
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正
2022-02-21 19:50 Updated by: cazfi
評語

Reply To alienvalkyrie

I can't currently build the gtk4 clients on my system. However, since the relevant code is literally identical between all seven branch/client combinations

gtk4-client isn't in working condition, so there would be nothing to test beyond compiling with it. And CI does that, for macOS (we don't have gtk4 libraries for ubuntu runners).

You can test that before pushing the commit to freeciv/freeciv repo by having your own clone of freeciv repo on github, enabling CI on that, and pushing there.

編輯

Please login to add comment to this ticket » 登入