Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] (PR#3593) gui-sdl: toggling map options doesn't redraw map
Home

[Freeciv-Dev] (PR#3593) gui-sdl: toggling map options doesn't redraw map

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3593) gui-sdl: toggling map options doesn't redraw map
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Mar 2003 23:52:10 -0800
Reply-to: rt@xxxxxxxxxxxxxx

In the SDL client, toggling a map option doesn't call
update_map_canvas_visible, so the canvas doesn't actually get redrawn.

Attached is a way to fix this (for map_grid_callback only; others should
be similar).  Note this requires the new flush code.

jason

Index: client/gui-sdl/optiondlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-sdl/optiondlg.c,v
retrieving revision 1.12
diff -u -r1.12 optiondlg.c
--- client/gui-sdl/optiondlg.c  2003/02/28 12:51:01     1.12
+++ client/gui-sdl/optiondlg.c  2003/03/03 07:49:36
@@ -878,8 +878,9 @@
 static int map_grid_callback(struct GUI *pWidget)
 {
   redraw_icon(pWidget);
-  flush_rect(pWidget->size);
+  sdl_dirty_rect(pWidget->size);
   draw_map_grid ^= 1;
+  update_map_canvas_visible();
   return -1;
 }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#3593) gui-sdl: toggling map options doesn't redraw map, Jason Short <=