Fix saving progress in double page mode

If the current page is being displayed we don't change anything, if is it not, we pick the current index page.
This commit is contained in:
Luis Ángel San Martín 2019-08-21 18:46:10 +02:00
parent 4f4c562a33
commit 0892d2a022

View File

@ -1088,7 +1088,9 @@ void Viewer::updateComic(ComicDB &comic)
if (!doublePage || (doublePage && render->currentPageIsDoublePage() == false)) {
comic.info.currentPage = render->getIndex() + 1;
} else {
comic.info.currentPage = std::min(render->numPages(), render->getIndex() + 2);
if (!(render->getIndex() + 1 == comic.info.currentPage || render->getIndex() + 2 == comic.info.currentPage)) {
comic.info.currentPage = std::min(render->numPages(), render->getIndex() + 1);
}
}
//set bookmarks
Bookmarks *boomarks = render->getBookmarks();