Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10632) error in drawing of focus unit
Home

[Freeciv-Dev] (PR#10632) error in drawing of focus unit

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10632) error in drawing of focus unit
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Oct 2004 22:43:22 -0700
Reply-to: rt@xxxxxxxxxxx

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

Here's a patch.

? newtiles
Index: client/control.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/control.c,v
retrieving revision 1.144
diff -u -r1.144 control.c
--- client/control.c    12 Oct 2004 16:42:12 -0000      1.144
+++ client/control.c    20 Oct 2004 05:43:14 -0000
@@ -379,15 +379,12 @@
       /* When the focus unit changes, we reset the is_shown flag. */
       pblinking_unit = punit;
       is_shown = TRUE;
-    }
-    if(is_shown) {
-      set_focus_unit_hidden_state(TRUE);
-      refresh_tile_mapcanvas(punit->tile, TRUE);
-      set_focus_unit_hidden_state(FALSE);
     } else {
-      refresh_tile_mapcanvas(punit->tile, TRUE);
+      /* Reverse the shown status. */
+      is_shown = !is_shown;
     }
-    is_shown=!is_shown;
+    set_focus_unit_hidden_state(!is_shown);
+    refresh_tile_mapcanvas(punit->tile, TRUE);
   }
 }
 

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