Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] (PR#10805) city dialog unit display buglet
Home

[Freeciv-Dev] (PR#10805) city dialog unit display buglet

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#10805) city dialog unit display buglet
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Nov 2004 22:54:00 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [chrisk - Sun Oct 31 13:10:35 2004]:

> when you load a unit onto a ship, with the context menue for the unit
in the
> unit display of the city dialog, the ship icon is not updated properly. It
> doesn't show the '+' (plus) sign. If you close and reopen the window, it
> does.

This patch should fix that.  Can you test?

However the unit info label (the pixmap) probably isn't updated correctly.

jason

Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.413
diff -u -r1.413 packhand.c
--- client/packhand.c   4 Nov 2004 03:02:10 -0000       1.413
+++ client/packhand.c   4 Nov 2004 06:53:55 -0000
@@ -1026,6 +1026,20 @@
         refresh_unit_city_dialogs(punit);
       }
 
+      if (punit->transported_by != packet_unit->transported_by) {
+       struct unit *ptrans;
+
+       if (punit->transported_by != -1
+           && (ptrans = find_unit_by_id(punit->transported_by))) {
+         refresh_unit_city_dialogs(ptrans);
+       }
+
+       if (packet_unit->transported_by != -1
+           && (ptrans = find_unit_by_id(packet_unit->transported_by))) {
+         refresh_unit_city_dialogs(ptrans);
+       }
+      }
+
     } /*** End of Change in activity or activity's target. ***/
     
     /* These two lines force the menus to be updated as appropriate when

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