[Freeciv-Dev] (PR#12190) next-city is too slow
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12190 >
> [chrisk - Wed Feb 09 19:58:55 2005]:
> My report wasn't very good. I'm talking about Shift-F find city tab. I
> think
> it *should* center the city in the map when you click on it. What I
> did was
> select a city then scroll down with the cursor key (holding the key)
> which
> is not very ... well it's funny seeing the map dance for 10 seconds or
> more
> {8-:
This patch should improve that behavior too. In 2.1 we can improve this
further by using queued drawing.
-jason
Index: client/gui-gtk-2.0/citydlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/citydlg.c,v
retrieving revision 1.116
diff -u -r1.116 citydlg.c
--- client/gui-gtk-2.0/citydlg.c 8 Feb 2005 22:14:17 -0000 1.116
+++ client/gui-gtk-2.0/citydlg.c 10 Feb 2005 18:06:38 -0000
@@ -2880,7 +2880,9 @@
reset_worklist(pdialog->production.worklist,
&pdialog->pcity->worklist, pdialog->pcity);
+ can_slide = FALSE;
center_tile_mapcanvas(pdialog->pcity->tile);
+ can_slide = TRUE;
set_cityopt_values(pdialog); /* need not be in refresh_city_dialog */
refresh_city_dialog(pdialog->pcity);
Index: client/gui-gtk-2.0/finddlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/finddlg.c,v
retrieving revision 1.18
diff -u -r1.18 finddlg.c
--- client/gui-gtk-2.0/finddlg.c 31 Oct 2004 20:45:54 -0000 1.18
+++ client/gui-gtk-2.0/finddlg.c 10 Feb 2005 18:06:38 -0000
@@ -179,7 +179,9 @@
**************************************************************************/
static void find_destroy_callback(GtkWidget *w, gpointer data)
{
+ can_slide = FALSE;
center_tile_mapcanvas(pos);
+ can_slide = TRUE;
}
/**************************************************************************
@@ -196,6 +198,9 @@
gtk_tree_model_get(model, &it, 1, &pcity, -1);
- if (pcity)
+ if (pcity) {
+ can_slide = FALSE;
center_tile_mapcanvas(pcity->tile);
+ can_slide = TRUE;
+ }
}
|
|