Oops, make that actually compile

This commit is contained in:
David Sansome 2013-08-18 13:07:32 +10:00
parent 534f216de2
commit 4b0a7ae70b
1 changed files with 4 additions and 4 deletions

View File

@ -104,19 +104,19 @@ void MoodbarRenderer::Render(const ColorVector& colors, QPainter* p, const QRect
int g = 0;
int b = 0;
uint start = x * colors.size() / rect.width();
uint end = (x + 1) * colors.size() / rect.width();
int start = x * colors.size() / rect.width();
int end = (x + 1) * colors.size() / rect.width();
if (start == end)
end = qMin(start + 1, colors.size() - 1);
for (uint j=start; j<end; j++) {
for (int j=start; j<end; j++) {
r += colors[j].red();
g += colors[j].green();
b += colors[j].blue();
}
const uint n = end - start;
const int n = end - start;
screen_colors.append(QColor(r/n, g/n, b/n));
}