Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #857120

City flag shrinks (S2_6, qt client)

Added by Chippo Elder over 2 years ago. Updated 29 days ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

See attached screenshot.

At seemingly random times (I will try harder to reproduce), the flag on my cities shrinks. As you can see, the code that prints the battlements to show occupation doesn't know that the flag has shrunk.

I kinda like this bug. For a change, in the main map, you can see whether the hill/mountain/desert to the northwest of your city has a mine or not - in this case you can see that it does have a mine.

But it's going to freak new users out, so something must change. Either the battlements must also shrink or the flag must stay big.

No savegame to show (yet). The problem disappears when you reload.

History

#1 Updated by Chippo Elder over 2 years ago

250

Also seen if 3.0.92-dev (2d7e624d07), gui-qt. I don't see any relevant logs at the times that it happens. It happens at turn end, while you're looking at it. Saving and loading is a 100% sure way to get rid of it, hence no savegames. Flipping to other tabs and back does not fix it. It just leaves, a few turns later, the same way it arrived.

#2 Updated by Chippo Elder over 2 years ago

250
250

All of the screenshots and comments in this Edit are against 2.6.1+ (modified b31d594a73).

I've finally seen both a shrunken and unshrunken flag in the same screen. See first attachment. Normally, (well, abnormally, 'cos this is a bug) when the flags flip between shrunken and unshrunken, they all happen at the same time.

I must also report that if you play 2.6.1+ for a long time between save/reloads (which always fixes it), you'll mostly be playing with shrunken flags. They do flip occasionally, but mostly they are small.

Also attached is a fullscreen at the time of the above. 6 of the 18 visible cities are shrunken.

#3 Updated by Jacob Nevins over 2 years ago

I think this is triggered by viewing the Players dialog. At that point, I think flag sprites are shrunk, and this gradually gets reflected in the main map as bits of it are redrawn.

I suspect the COL_FLAG case in plr_item::data() is modifying global state it got back from get_nation_flag_sprite() -- certainly it is doing some scaling.

With the city full bar at least, the flag size influences where text and lines are drawn, and I sometimes see a break in the lines of a single city's label box.

I kinda like this bug

I've long wanted to give users a choice over flag size that's independent of tileset, but that's definitely a topic for another ticket.

#4 Updated by Marko Lindqvist about 2 months ago

  • Category set to gui-qt
  • Sprint/Milestone set to 3.0.3

Jacob Nevins wrote:

I suspect the COL_FLAG case in plr_item::data() is modifying global state it got back from get_nation_flag_sprite()

Yes, quick test of wrapping that part so that a temporary copy of the flag is used stops the actual flags from shrinking.

#6 Updated by Marko Lindqvist about 1 month ago

  • Status changed from Resolved to In Progress

The patch apparently does not match what I tested....

#8 Updated by Marko Lindqvist 29 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF