Author: mir3x Date: Fri Jan 6 00:27:12 2017 New Revision: 34794 URL: http://svn.gna.org/viewcvs/freeciv?rev=34794&view=rev Log: Qt client - Fixed science rate not checked it's over available maximum rate.
See bug #25412 Modified: branches/S3_0/client/gui-qt/ratesdlg.cpp Modified: branches/S3_0/client/gui-qt/ratesdlg.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/gui-qt/ratesdlg.cpp?rev=34794&r1=34793&r2=34794&view=diff ============================================================================== --- branches/S3_0/client/gui-qt/ratesdlg.cpp (original) +++ branches/S3_0/client/gui-qt/ratesdlg.cpp Fri Jan 6 00:27:12 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