Author: cazfi
Date: Thu Feb 16 05:48:23 2017
New Revision: 35038

URL: http://svn.gna.org/viewcvs/freeciv?rev=35038&view=rev
Log:
Set production text color correctly when city production display is
enabled without city name display being enabled.

See gna bug #25477

Modified:
    branches/S3_0/client/mapview_common.c

Modified: branches/S3_0/client/mapview_common.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/mapview_common.c?rev=35038&r1=35037&r2=35038&view=diff
==============================================================================
--- branches/S3_0/client/mapview_common.c       (original)
+++ branches/S3_0/client/mapview_common.c       Thu Feb 16 05:48:23 2017
@@ -1781,6 +1781,10 @@
   canvas_x += tileset_tile_width(tileset) / 2 * map_zoom;
   canvas_y += tileset_citybar_offset_y(tileset) * map_zoom;
 
+  get_city_mapview_name_and_growth(pcity, name, sizeof(name),
+                                   growth, sizeof(growth), &growth_color,
+                                   &production_color);
+
   if (gui_options.draw_city_names) {
     int drawposx;
 
@@ -1790,10 +1794,6 @@
 
     total_width = 0;
     total_height = 0;
-
-    get_city_mapview_name_and_growth(pcity, name, sizeof(name),
-                                    growth, sizeof(growth), &growth_color,
-                                    &production_color);
 
     get_text_size(&name_rect.w, &name_rect.h, FONT_CITY_NAME, name);
     total_width += name_rect.w;
@@ -1854,8 +1854,8 @@
 
     canvas_put_text(pcanvas, (canvas_x - total_width / 2) / map_zoom,
                     canvas_y / map_zoom,
-                   FONT_CITY_PROD,
-                   get_color(tileset, production_color), prod);
+                    FONT_CITY_PROD,
+                    get_color(tileset, production_color), prod);
 
     canvas_y += total_height;
     *width = MAX(*width, total_width);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to