Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2003:
[Freeciv-Dev] (PR#4023) switching tilesets in gui-gtk
Home

[Freeciv-Dev] (PR#4023) switching tilesets in gui-gtk

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#4023) switching tilesets in gui-gtk
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Apr 2003 01:05:20 -0700
Reply-to: rt@xxxxxxxxxxxxxx

As reported by somebody-or-other (Kenn?) for the gtk2 client...

If you start the GTK client with a non-iso tileset, then switch to an 
iso tileset and turn on the map grid it won't work.  This is because the 
line-drawing data was never initialized.

The patch is simple.

jason

Index: client/gui-gtk/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v
retrieving revision 1.133
diff -u -r1.133 gui_main.c
--- client/gui-gtk/gui_main.c   2003/04/04 15:47:46     1.133
+++ client/gui-gtk/gui_main.c   2003/04/18 08:02:48
@@ -872,18 +872,18 @@
 
   fill_bg_gc = gdk_gc_new(root_window);
 
-  if (is_isometric) {
-    thin_line_gc = gdk_gc_new(root_window);
-    thick_line_gc = gdk_gc_new(root_window);
-    gdk_gc_set_line_attributes(thin_line_gc, 1,
-                              GDK_LINE_SOLID,
-                              GDK_CAP_NOT_LAST,
-                              GDK_JOIN_MITER);
-    gdk_gc_set_line_attributes(thick_line_gc, 2,
-                              GDK_LINE_SOLID,
-                              GDK_CAP_NOT_LAST,
-                              GDK_JOIN_MITER);
-  }
+  /* These are used in isometric view only, but are always created because
+   * the tileset can change at runtime. */
+  thin_line_gc = gdk_gc_new(root_window);
+  thick_line_gc = gdk_gc_new(root_window);
+  gdk_gc_set_line_attributes(thin_line_gc, 1,
+                            GDK_LINE_SOLID,
+                            GDK_CAP_NOT_LAST,
+                            GDK_JOIN_MITER);
+  gdk_gc_set_line_attributes(thick_line_gc, 2,
+                            GDK_LINE_SOLID,
+                            GDK_CAP_NOT_LAST,
+                            GDK_JOIN_MITER);
 
   fill_tile_gc = gdk_gc_new(root_window);
   gdk_gc_set_fill(fill_tile_gc, GDK_STIPPLED);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#4023) switching tilesets in gui-gtk, Jason Short <=