Merge lp:~nomeata/widelands/plot-improvements into lp:widelands

Proposed by Joachim Breitner
Status: Merged
Merged at revision: 6093
Proposed branch: lp:~nomeata/widelands/plot-improvements
Merge into: lp:widelands
Diff against target: 19 lines (+4/-2)
1 file modified
src/wui/plot_area.cc (+4/-2)
To merge this branch: bzr merge lp:~nomeata/widelands/plot-improvements
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+81789@code.launchpad.net

Description of the change

This adds at least one option to the slider.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/wui/plot_area.cc'
2--- src/wui/plot_area.cc 2011-11-09 21:00:20 +0000
3+++ src/wui/plot_area.cc 2011-11-09 22:53:27 +0000
4@@ -145,11 +145,13 @@
5 * is called from the outside, e.g. from a slider, then from that moment on
6 * this class assumes that values passed to set_time_id adhere to the new
7 * choice of time spans.
8+ * We start to search with i=1 to ensure that at least one option besides
9+ * "game" will be offered to the user.
10 */
11 int32_t WUIPlot_Area::get_game_time_id() {
12 uint32_t game_time = get_game_time();
13- uint32_t i = 0;
14- for (i = 0; i < 7 && time_in_ms[i] <= game_time; i++) {
15+ uint32_t i;
16+ for (i = 1; i < 7 && time_in_ms[i] <= game_time; i++) {
17 }
18 m_game_time_id = i;
19 return m_game_time_id;

Subscribers

People subscribed via source and target branches

to status/vote changes: