[Freeciv-Dev] (PR#11076) unit report update bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=11076 >
> [chrisk - Thu Nov 18 21:19:10 2004]:
>
>
> CVS 19 NOV 2004 S2 GTK2
>
> When i produce Caravans and Trucks in my cities, and change production of
> caravans to trucks, the unit report still shows caravans.
>
> When I close the tab and reopen it, it is updated.
Does this patch help?
jason
? client/gui-gtk-2.0/diff
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.420
diff -u -r1.420 packhand.c
--- client/packhand.c 15 Nov 2004 18:16:14 -0000 1.420
+++ client/packhand.c 20 Nov 2004 08:12:13 -0000
@@ -388,6 +388,7 @@
{
int i;
bool city_is_new, city_has_changed_owner = FALSE, need_effect_update = FALSE;
+ bool need_units_dialog_update = FALSE;
struct city *pcity;
bool popup, update_descriptions = FALSE, name_changed = FALSE;
struct unit *pfocus_unit = get_unit_in_focus();
@@ -472,6 +473,11 @@
pcity->shield_stock=packet->shield_stock;
pcity->pollution=packet->pollution;
+ if (city_is_new
+ || pcity->is_building_unit != packet->is_building_unit
+ || pcity->currently_building != packet->currently_building) {
+ need_units_dialog_update = TRUE;
+ }
pcity->is_building_unit=packet->is_building_unit;
pcity->currently_building=packet->currently_building;
if (city_is_new) {
@@ -554,6 +560,11 @@
update_unit_info_label(pfocus_unit);
}
+ /* Update the units dialog if necessary. */
+ if (need_units_dialog_update) {
+ activeunits_report_dialog_update();
+ }
+
/* Update the panel text (including civ population). */
update_info_label();
|
|