Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] (PR#7446) center_on_something fails
Home

[Freeciv-Dev] (PR#7446) center_on_something fails

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7446) center_on_something fails
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Feb 2004 13:17:43 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7446 >

> [jdorje - Fri Feb 20 01:47:34 2004]:
> 
> When you first start a game, the focus unit is put in the top-left of 
> the mapview (not the center as it should be).
> 
> When the first center_on_something (in handle_game_state I think) is 
> called, the map canvas is not set up.  mapview_canvas.width == 
> mapview_canvas.height == 0.  Thus centering on the unit puts it at 
> (map_x0, map_y0).  When the canvas is set up this remains the origin.
> 
> There are several possible options:
>    - When changing the mapview size keep the center, not the origin.
>    - Ensure that the canvas is set up before centering (set up canvas
>      earlier).
>    - Recenter when changing canvas size.
> 
> Probably #1 and/or #2 is the best.

This is a bad bug that needs to be fixed!

I don't see why it stopped working, though.  I mean, it's obvious why it
doesn't work now, but why *did* it work before?

jason



[Prev in Thread] Current Thread [Next in Thread]