Merge lp:~hjd/widelands/bug1095022 into lp:widelands

Proposed by Hans Joachim Desserud
Status: Merged
Merged at revision: 6622
Proposed branch: lp:~hjd/widelands/bug1095022
Merge into: lp:widelands
Diff against target: 11 lines (+1/-0)
1 file modified
src/ui_basic/slider.cc (+1/-0)
To merge this branch: bzr merge lp:~hjd/widelands/bug1095022
Reviewer Review Type Date Requested Status
Nasenbaer Approve
Review via email: mp+174621@code.launchpad.net

Description of the change

Basically using the solution suggested by SirVer in the bug report. It makes sense, and scan-build is happy.

To post a comment you must log in.
Revision history for this message
Nasenbaer (nasenbaer) wrote :

trivial to approve :)
Thank you hjd.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ui_basic/slider.cc'
2--- src/ui_basic/slider.cc 2013-02-09 23:18:23 +0000
3+++ src/ui_basic/slider.cc 2013-07-14 16:17:29 +0000
4@@ -607,6 +607,7 @@
5 void DiscreteSlider::layout() {
6 uint32_t w = get_w();
7 uint32_t h = get_h();
8+ assert(labels.size());
9 slider.set_pos(Point(w / (2 * labels.size()) - slider.m_cursor_size / 2, 0));
10 slider.set_size
11 (w - (w / labels.size()) + slider.m_cursor_size,

Subscribers

People subscribed via source and target branches

to status/vote changes: