MCPcopy Create free account
hub / github.com/YACReader/yacreader / nextDoublePage

Method nextDoublePage

YACReader/render.cpp:805–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

803 }
804}
805void Render::nextDoublePage()
806{
807 int nextPage;
808 if (currentIndex + 2 < (int)comic->numPages()) {
809 nextPage = currentIndex + 2;
810 } else {
811 nextPage = currentIndex;
812 }
813 if (currentIndex != nextPage) {
814 comic->setIndex(nextPage);
815 previousIndex = currentIndex;
816 currentIndex = nextPage;
817 update();
818 emit pageChanged(currentIndex);
819 } else if (hasLoadedComic() && ((unsigned int)currentIndex >= numPages() - 2)) {
820 emit isLast();
821 }
822}
823
824// si se solicita la página anterior, se calcula cuál debe ser en función de si se lee en modo a doble página o no.
825// la página sólo se renderiza, si realmente ha cambiado.

Callers 1

nextMethod · 0.80

Calls 2

setIndexMethod · 0.80
numPagesMethod · 0.45

Tested by

no test coverage detected