Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10590) Screen not updated after changing tileset
Home

[Freeciv-Dev] (PR#10590) Screen not updated after changing tileset

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dmstewart@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#10590) Screen not updated after changing tileset
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Oct 2004 00:19:34 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [dmstewart@xxxxxxxxx - Mon Oct 18 08:23:22 2004]:
> 
> I started a new game with topo 13, and changed from isotrident to
> isophex-2.0.0
> Only a small rectangle around my units was redrawn; the rest stayed as
> isotrident.
> 
> It didn't redraw until I scrolled it right off the screen and back
> again
> 
> Freeciv 2.0.0beta1-win32
> 
> It might be related to PR#8603 ?

Indeed.  This can be reproduced with any tileset and client:

- Make a small map.
- Make a large mapview (a large % of the map).
- Change tileset.

The problem is center_tile_mapcanvas doesn't always cause a full redraw.
 Maybe if can_slide is set to FALSE a full redraw should always be done
(in which case can_slide should be renamed).  This patch takes the
simpler route of just calling update_map_canvas_visible.

jason

? diff
? newtiles
? data/isotrident/selection.png
? data/isotrident/selection.spec
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.205
diff -u -r1.205 tilespec.c
--- client/tilespec.c   17 Oct 2004 15:47:48 -0000      1.205
+++ client/tilespec.c   19 Oct 2004 07:18:34 -0000
@@ -494,6 +494,9 @@
   tileset_changed();
   can_slide = FALSE;
   center_tile_mapcanvas(center_tile);
+  /* update_map_cavnas_visible forces a full redraw.  Otherwise with fast
+   * drawing we might not get one.  Of course this is slower. */
+  update_map_canvas_visible();
   can_slide = TRUE;
 }
 

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