Author: mir3x
Date: Thu Nov 24 07:52:33 2016
New Revision: 34626

URL: http://svn.gna.org/viewcvs/freeciv?rev=34626&view=rev
Log:
Qt client - governor sliders could be incorrect if there was custom governor

See bug #25335

Modified:
    branches/S2_6/client/gui-qt/citydlg.cpp

Modified: branches/S2_6/client/gui-qt/citydlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/citydlg.cpp?rev=34626&r1=34625&r2=34626&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/citydlg.cpp     (original)
+++ branches/S2_6/client/gui-qt/citydlg.cpp     Thu Nov 24 07:52:33 2016
@@ -55,6 +55,7 @@
 #include "hudwidget.h"
 
 //agents
+#include "cma_core.h"
 #include "cma_fec.h"
 
 extern QApplication *qapp;
@@ -2171,16 +2172,15 @@
 ****************************************************************************/
 void city_dialog::update_sliders()
 {
-  const struct cm_parameter *param;
+  struct cm_parameter *param;
   int output;
   QVariant qvar;
   QLabel *label;
 
-  if (cma_table->currentRow() == -1 || cmafec_preset_num() == 0) {
+  param = new cm_parameter;
+  if (cma_is_city_under_agent(pcity, param) == false) {
     return;
   }
-
-  param = cmafec_preset_get_parameter(cma_table->currentRow());
 
   for (output = O_FOOD; output < 2 * O_LAST; output++) {
     slider_tab[output]->blockSignals(true);
@@ -2210,6 +2210,7 @@
   for (output = O_FOOD; output < 2 * O_LAST; output++) {
     slider_tab[output]->blockSignals(false);
   }
+  delete param;
 }
 
 /****************************************************************************


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

Reply via email to