Author: mir3x
Date: Fri Jan  6 00:35:05 2017
New Revision: 34796

URL: http://svn.gna.org/viewcvs/freeciv?rev=34796&view=rev
Log:
Qt client - Fixed science rate not checked it's over available maximum rate.

See bug #25412


Modified:
    trunk/client/gui-qt/ratesdlg.cpp

Modified: trunk/client/gui-qt/ratesdlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/ratesdlg.cpp?rev=34796&r1=34795&r2=34796&view=diff
==============================================================================
--- trunk/client/gui-qt/ratesdlg.cpp    (original)
+++ trunk/client/gui-qt/ratesdlg.cpp    Fri Jan  6 00:35:05 2017
@@ -361,7 +361,7 @@
   if (event->buttons() & Qt::LeftButton) {
     mouse_x = static_cast<double>(event->x());
 
-    if (mouse_x <= current_max * width() / 10 - cursor_size) {
+    if (mouse_x <= current_max * width() / 10 - 2 * cursor_size) {
       moved = 1;
     } else {
       moved = 2;
@@ -412,6 +412,9 @@
       if (current_max < current_min) {
         current_max = current_min;
       }
+      if (current_max - current_min > max_rates) {
+        current_min = current_max - max_rates;
+      }
       moved = 1;
     } else if ((moved != 1) && on_max) {
       x_max = x_mouse * width() /


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

Reply via email to