Fix render bug in pinned chats reordering.
If the last chats row was painted a wrong lastPaintedPos was used.
This commit is contained in:
parent
ca47e4ebfd
commit
588aabc6d7
|
@ -185,7 +185,6 @@ void DialogsInner::paintRegion(Painter &p, const QRegion ®ion, 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 ®ion, 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.
|
||||||
|
|
Loading…
Reference in New Issue