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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7446) center_on_something fails
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2004 16:49:29 -0700
Reply-to: rt@xxxxxxxxxxx

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

Jason Short wrote:

> In short: can you give a reason why this function is needed???

Ahh, the single_tile canvas is also allocated in this function (but well 
hidden :-).

Therefore I suggest this patch.  Tested under gtk and xaw clients.

jason

? core.5395
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.99
diff -u -r1.99 mapview_common.c
--- client/mapview_common.c     12 Apr 2004 17:15:06 -0000      1.99
+++ client/mapview_common.c     12 Apr 2004 23:47:23 -0000
@@ -2179,17 +2179,6 @@
 **************************************************************************/
 void init_mapcanvas_and_overview(void)
 {
-  mapview_canvas.tile_width = 0;
-  mapview_canvas.tile_height = 0;
-  mapview_canvas.width = 0;
-  mapview_canvas.height = 0;
-  mapview_canvas.store = canvas_create(1, 1);
   mapview_canvas.single_tile
     = canvas_create(UNIT_TILE_WIDTH, UNIT_TILE_HEIGHT);
-
-  overview.map_x0 = 0;
-  overview.map_y0 = 0;
-  overview.width = 0;
-  overview.height = 0;
-  overview.store = NULL;
 }

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