Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7385) overview isn't updated
Home

[Freeciv-Dev] Re: (PR#7385) overview isn't updated

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7385) overview isn't updated
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 8 Feb 2004 09:10:22 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Sat, Feb 07, 2004 at 10:04:46AM -0800, Jason Dorje Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >
> 
> Raimar Falke wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >
> > 
> > On Fri, Feb 06, 2004 at 12:57:58PM -0800, Jason Dorje Short wrote:
> > 
> >><URL: http://rt.freeciv.org/Ticket/Display.html?id=7385 >
> >>
> >>The map overview isn't always properly updated.
> >>
> >>For instance when the game is over the map is revealed, but the overview 
> >>isn't updated.  This is new behavior; no doubt a result of the recent 
> >>overview unification.
> >>
> >>Produced with gui-gtk-2.0 but probably common to all clients...
> > 
> > 
> > Can you provide a savegame?
> 
> - Start game.
> - Disband all units.
> - Look at overview.

The problem is much worse. The overview isn't updated at all (except
for expose and recentering). A clear sign that I rushed the patch too
much and so it got too less testing.

The fix is to draw (copy to screen + white rectangle) the complete
overview at unqueue_mapview_updates.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "From what I am reading Win98 and NT5.0 will be getting rid of all that
  crap anyway. Seems that Microsoft has invented something called TCP/IP and
  another really revolutionary concept called DNS that eliminates the
  netbios crap too. All that arping from browsers is going to go away.
  I also hear rumors that they are on the verge of breakthrough discoveries
  called NFS, and LPD too. Given enough time and money, they might
  eventually invent Unix."
    -- George Bonser in linux-kernel

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.74
diff -u -u -r1.74 mapview_common.c
--- client/mapview_common.c     2004/02/03 20:16:07     1.74
+++ client/mapview_common.c     2004/02/08 17:04:21
@@ -38,6 +38,7 @@
                                   int canvas_x, int canvas_y);
 static void center_tile_overviewcanvas(int map_x, int map_y);
 static void get_mapview_corners(int x[4], int y[4]);
+static void redraw_overview(void);
 
 /**************************************************************************
  Refreshes a single tile on the map canvas.
@@ -1464,6 +1465,7 @@
   needed_updates = UPDATE_NONE;
 
   flush_dirty();
+  redraw_overview();
 }
 
 /**************************************************************************
@@ -1518,6 +1520,10 @@
 static void redraw_overview(void)
 {
   struct canvas_store *dest = overview.window;
+
+  if (!dest || !overview.store) {
+    return;
+  }
 
   {
     struct canvas_store *src = overview.store;

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