Author: mir3x
Date: Fri Jan  6 00:34:55 2017
New Revision: 34795

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

See bug #25412


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

Modified: branches/S2_6/client/gui-qt/ratesdlg.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/ratesdlg.cpp?rev=34795&r1=34794&r2=34795&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/ratesdlg.cpp    (original)
+++ branches/S2_6/client/gui-qt/ratesdlg.cpp    Fri Jan  6 00:34:55 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