Not painting anything in HistoryInner if _history or

_migrated have pending resized items.
This commit is contained in:
John Preston 2016-04-01 11:52:25 +04:00
parent 1f6da4c734
commit 73a27c2def
1 changed files with 7 additions and 9 deletions

View File

@ -193,18 +193,16 @@ void HistoryInner::enumerateUserpicsInHistory(History *h, int htop, Method metho
}
void HistoryInner::paintEvent(QPaintEvent *e) {
if (App::wnd() && App::wnd()->contentOverlapped(this, e)) return;
if (App::wnd() && App::wnd()->contentOverlapped(this, e)) {
return;
}
if (!App::main()) return;
if (!App::main()) {
return;
}
if ((_history && _history->hasPendingResizedItems()) || (_migrated && _migrated->hasPendingResizedItems())) {
Notify::handlePendingHistoryUpdate();
if (_history) {
t_assert(!_history->hasPendingResizedItems());
}
if (_migrated) {
t_assert(!_migrated->hasPendingResizedItems());
}
return;
}
Painter p(this);