Author: pepeto
Date: Sun Jul  6 10:40:36 2014
New Revision: 25395

URL: http://svn.gna.org/viewcvs/freeciv?rev=25395&view=rev
Log:
Send research info when editing the advances for a player via
the editor. Also, handle correctly this case in client side.

Reported by Marko Lindqvist (cazfi@gna)

See gna bug #22252

Modified:
    trunk/client/packhand.c
    trunk/server/edithand.c

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=25395&r1=25394&r2=25395&view=diff
==============================================================================
--- trunk/client/packhand.c     (original)
+++ trunk/client/packhand.c     Sun Jul  6 10:40:36 2014
@@ -2141,22 +2141,29 @@
     break;
   } research_players_iterate_end;
 
-  if (C_S_RUNNING == client_state()
-      && client_has_player()
-      && presearch == research_get(client_player())) {
-    if (poptechup && !client_player()->ai_controlled) {
-      science_report_dialog_popup(FALSE);
-    }
-    science_report_dialog_update();
-    if (tech_changed) {
-      /* If we just learned bridge building and focus is on a settler
-       * on a river the road menu item will remain disabled unless we
-       * do this. (applies in other cases as well.) */
-      if (0 < get_num_units_in_focus()) {
-        menus_update();
+  if (C_S_RUNNING == client_state()) {
+    if (presearch == research_get(client_player())) {
+      if (poptechup && !client_player()->ai_controlled) {
+        science_report_dialog_popup(FALSE);
       }
-      /* If we got a new tech the tech tree news an update. */
-      science_report_dialog_redraw();
+      science_report_dialog_update();
+      if (tech_changed) {
+        /* If we just learned bridge building and focus is on a settler
+         * on a river the road menu item will remain disabled unless we
+         * do this. (applies in other cases as well.) */
+        if (0 < get_num_units_in_focus()) {
+          menus_update();
+        }
+        /* If we got a new tech the tech tree news an update. */
+        science_report_dialog_redraw();
+      }
+    }
+    if (editor_is_active()) {
+      editgui_refresh();
+      research_players_iterate(presearch, pplayer) {
+        editgui_notify_object_changed(OBJTYPE_PLAYER, player_number(pplayer),
+                                      FALSE);
+      } research_players_iterate_end;
     }
   }
 }

Modified: trunk/server/edithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/edithand.c?rev=25395&r1=25394&r2=25395&view=diff
==============================================================================
--- trunk/server/edithand.c     (original)
+++ trunk/server/edithand.c     Sun Jul  6 10:40:36 2014
@@ -1277,6 +1277,7 @@
 
     /* Inform everybody about global advances */
     send_game_info(NULL);
+    send_research_info(research, NULL);
   }
 
   if (changed) {


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to