Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2606) upgrading a selected unit doesn't update leg
Home

[Freeciv-Dev] Re: (PR#2606) upgrading a selected unit doesn't update leg

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bh@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2606) upgrading a selected unit doesn't update legal orders
From: "ChrisK@xxxxxxxx via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 18 Dec 2002 14:15:44 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Dec 18, 2002 at 12:59:35PM -0800, ChrisK@xxxxxxxx via RT wrote:
> On Wed, Dec 18, 2002 at 11:37:59AM -0800, Benoit Hudson via RT wrote:
> > On Wed, Dec 18, 2002 at 11:28:02AM -0800, ChrisK@xxxxxxxx via RT wrote:
> > > On Wed, Dec 18, 2002 at 11:05:03AM -0800, Benoit Hudson via RT wrote:
> > > >
> > > > I upgrade a settler to an engineer.  Now, I need to deselect that unit 
> > > > and
> > > > select it again before I can modify ('o') any terrain.
> > >
> > > I can't reproduce this with 1.14 Beta Cvs. Which version did you use?
> > 
> > 1.14.0-beta2 downloaded Nov 30.  Precisely what I do is select the unit in
> > the city dialog, activate it, close the dialog & make sure it's a settler.
> > Then, reopen the city dialog, upgrade.  The 'orders' menu doesn't change,
> > and I get no response to an 'o'.  No effect of closing the city dialog.  I
> > can send a save file if you'd like.
> 
> Ok, I see. As soon as you move the engineer, the orders menu is updated.
> 
> It's Gtk 1.2 at least.

The attached patch fixes it for me. Only tested with Gtk 1.2 .

Christian

-- 
Christian Knoke     * * *      http://www.enter.de/~c.knoke/
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.

--- client/packhand.c.orig      Sat Dec  7 21:10:24 2002
+++ client/packhand.c   Wed Dec 18 22:57:55 2002
@@ -897,6 +897,10 @@
       if (pcity && (pcity->id != punit->homecity)) {
        refresh_city_dialog(pcity);
       }
+      /* These two lines force the menus to be updated as appropriate when
+        the unit type changes. */
+      if(punit == get_unit_in_focus())
+         update_menus();
     }
 
     if (!same_pos(punit->x, punit->y, packet->x, packet->y)) { 

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