Fix render bug in pinned chats reordering.

If the last chats row was painted a wrong lastPaintedPos was used.
This commit is contained in:
John Preston 2017-07-15 14:20:53 +03:00
parent ca47e4ebfd
commit 588aabc6d7
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,6 @@ void DialogsInner::paintRegion(Painter &p, const QRegion &region, bool paintingO
p.translate(0, lastPaintedPos * st::dialogsRowHeight); p.translate(0, lastPaintedPos * st::dialogsRowHeight);
for (auto e = list.cend(); i != e; ++i) { for (auto e = list.cend(); i != e; ++i) {
auto row = (*i); auto row = (*i);
lastPaintedPos = row->pos();
if (lastPaintedPos * st::dialogsRowHeight >= dialogsClip.top() + dialogsClip.height()) { if (lastPaintedPos * st::dialogsRowHeight >= dialogsClip.top() + dialogsClip.height()) {
break; break;
} }
@ -196,6 +195,7 @@ void DialogsInner::paintRegion(Painter &p, const QRegion &region, bool paintingO
} }
p.translate(0, st::dialogsRowHeight); p.translate(0, st::dialogsRowHeight);
++lastPaintedPos;
} }
// Paint the dragged chat above all others. // Paint the dragged chat above all others.