Author: cazfi Date: Wed Feb 4 04:00:06 2015 New Revision: 27954 URL: http://svn.gna.org/viewcvs/freeciv?rev=27954&view=rev Log: Prevent gtk3-client Goto dialog from focusing in all cities in turn when refreshing the list of cities.
Reported by Jacob Nevins <jtn> See bug #20624 Modified: trunk/client/gui-gtk-3.0/gotodlg.c Modified: trunk/client/gui-gtk-3.0/gotodlg.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/gotodlg.c?rev=27954&r1=27953&r2=27954&view=diff ============================================================================== --- trunk/client/gui-gtk-3.0/gotodlg.c (original) +++ trunk/client/gui-gtk-3.0/gotodlg.c Wed Feb 4 04:00:06 2015 @@ -60,6 +60,7 @@ static GtkListStore *store; static GtkTreeSelection *selection; struct tile *original_tile; +static bool gotodlg_updating = FALSE; static void update_goto_dialog(GtkToggleButton *button); static void update_source_label(void); @@ -423,12 +424,14 @@ **************************************************************************/ static void update_goto_dialog(GtkToggleButton *button) { - gtk_list_store_clear(store); - if (!client_has_player()) { /* Case global observer. */ return; } + + gotodlg_updating = TRUE; + + gtk_list_store_clear(store); if (gtk_toggle_button_get_active(button)) { players_iterate(pplayer) { @@ -437,6 +440,9 @@ } else { list_store_append_player_cities(store, client_player()); } + + gotodlg_updating = FALSE; + refresh_airlift_column(); } @@ -498,7 +504,14 @@ static void goto_selection_callback(GtkTreeSelection *selection, gpointer data) { - struct city *pdestcity = get_selected_city(); + struct city *pdestcity; + + if (gotodlg_updating) { + return; + } + + pdestcity = get_selected_city(); + if (NULL != pdestcity) { center_tile_mapcanvas(city_tile(pdestcity)); } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits