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

Method syncRenderToContinuousPage

YACReader/viewer.cpp:1435–1449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433}
1434
1435void Viewer::syncRenderToContinuousPage()
1436{
1437 if (!continuousScroll || !render->hasLoadedComic() || lastCenterPage < 0) {
1438 return;
1439 }
1440
1441 const int page = qBound(0, lastCenterPage, static_cast<int>(render->numPages()) - 1);
1442 if (static_cast<int>(render->getIndex()) == page) {
1443 return;
1444 }
1445
1446 syncingRenderFromContinuousScroll = true;
1447 render->goTo(page);
1448 syncingRenderFromContinuousScroll = false;
1449}
1450
1451void Viewer::onNumPagesReady(unsigned int numPages)
1452{

Callers

nothing calls this directly

Calls 4

hasLoadedComicMethod · 0.80
numPagesMethod · 0.45
getIndexMethod · 0.45
goToMethod · 0.45

Tested by

no test coverage detected