Don't emit pageAvailable unless it is available.

This commit is contained in:
Luis Ángel San Martín 2018-01-06 08:54:44 +01:00
parent 103f8caae5
commit 4e0d2644fb

View File

@ -308,8 +308,6 @@ void Viewer::updatePage()
content->setPixmap(*currentPage); content->setPixmap(*currentPage);
updateContentSize(); updateContentSize();
updateVerticalScrollBar(); updateVerticalScrollBar();
emit backgroundChanges();
emit(pageAvailable(true));
if(goToFlow->isHidden()) if(goToFlow->isHidden())
setFocus(Qt::ShortcutFocusReason); setFocus(Qt::ShortcutFocusReason);
@ -319,6 +317,10 @@ void Viewer::updatePage()
if(currentPage->isNull()) if(currentPage->isNull())
setPageUnavailableMessage(); setPageUnavailableMessage();
else
emit(pageAvailable(true));
emit backgroundChanges();
if(restoreMagnifyingGlass) if(restoreMagnifyingGlass)
{ {