Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] (PR#2532) one more tileset switching fix
Home

[Freeciv-Dev] (PR#2532) one more tileset switching fix

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#2532) one more tileset switching fix
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 9 Dec 2002 23:04:54 -0800
Reply-to: rt@xxxxxxxxxxxxxx

single_tile_pixmap needs to be re-initialized so that unit animations
will succeed.

Attached patch fixes gui-gtk and gui-gtk-2.0 (fully tested for gtk,
untested for gtk2).

jason



Index: client//gui-gtk/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v
retrieving revision 1.142
diff -u -r1.142 mapview.c
--- client//gui-gtk/mapview.c   2002/12/07 09:59:18     1.142
+++ client//gui-gtk/mapview.c   2002/12/10 07:02:28
@@ -2048,4 +2048,12 @@
 {
   reset_city_dialogs();
   reset_unit_table();
+
+  /* single_tile is originally allocated in gui_main.c. */
+  gdk_pixmap_unref(single_tile_pixmap);
+  single_tile_pixmap_width = UNIT_TILE_WIDTH;
+  single_tile_pixmap_height = UNIT_TILE_HEIGHT;
+  single_tile_pixmap = gdk_pixmap_new(root_window, 
+                                     single_tile_pixmap_width,
+                                     single_tile_pixmap_height, -1);
 }
Index: client//gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.30
diff -u -r1.30 mapview.c
--- client//gui-gtk-2.0/mapview.c       2002/12/07 09:59:18     1.30
+++ client//gui-gtk-2.0/mapview.c       2002/12/10 07:02:28
@@ -2117,4 +2117,12 @@
 {
   reset_city_dialogs();
   reset_unit_table();
+
+  /* single_tile is originally allocated in gui_main.c. */
+  gdk_pixmap_unref(single_tile_pixmap);
+  single_tile_pixmap_width = UNIT_TILE_WIDTH;
+  single_tile_pixmap_height = UNIT_TILE_HEIGHT;
+  single_tile_pixmap = gdk_pixmap_new(root_window, 
+                                     single_tile_pixmap_width,
+                                     single_tile_pixmap_height, -1);
 }

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#2532) one more tileset switching fix, Jason Short via RT <=