Author: mir3x
Date: Tue Mar  3 19:37:10 2015
New Revision: 28395

URL: http://svn.gna.org/viewcvs/freeciv?rev=28395&view=rev
Log:
Fixed indicator sprites refreshing leading to crash after ruleset change in 
qt-client.
Reported by GriffonSpade and Louis Moureaux<louis94>
Patch by Louis Moureaux<louis94>

See bug #23326


Modified:
    trunk/client/gui-qt/mapview.cpp
    trunk/client/gui-qt/mapview.h

Modified: trunk/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=28395&r1=28394&r2=28395&view=diff
==============================================================================
--- trunk/client/gui-qt/mapview.cpp     (original)
+++ trunk/client/gui-qt/mapview.cpp     Tue Mar  3 19:37:10 2015
@@ -1014,6 +1014,18 @@
    *  PORTME , if needed */
 }
 
+/**************************************************************************
+  Updates indicator sprites from tileset
+**************************************************************************/
+void info_label::update_tileset()
+{
+  info_update(); // Updates tax rate indicators
+  set_indicator_icons(client_research_sprite(),
+                      client_warming_sprite(),
+                      client_cooling_sprite(),
+                      client_government_sprite());
+}
+
 /****************************************************************************
   Slot for sprite_widget::wheel_rolled
 ****************************************************************************/
@@ -1385,6 +1397,7 @@
   QWidget *w;
 
   gui()->unitinfo_wdg->update_arrow_pix();
+  gui()->game_info_label->update_tileset();
   destroy_city_dialog();
   /* Update science report if open */
   if (gui()->is_repo_dlg_open("SCI")) {

Modified: trunk/client/gui-qt/mapview.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.h?rev=28395&r1=28394&r2=28395&view=diff
==============================================================================
--- trunk/client/gui-qt/mapview.h       (original)
+++ trunk/client/gui-qt/mapview.h       Tue Mar  3 19:37:10 2015
@@ -294,6 +294,7 @@
   void set_turn_button_enabled(bool enabled);
   void info_update();
   void update_menu();
+  void update_tileset();
   void set_indicator_icons(const struct sprite *bulb,
                            const struct sprite *sol,
                            const struct sprite *flake,


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

Reply via email to