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

Method onContinuousScroll

YACReader/viewer.cpp:1326–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324}
1325
1326void Viewer::onContinuousScroll(int value)
1327{
1328 if (!continuousScroll || !render->hasLoadedComic() || applyingContinuousModelState) {
1329 return;
1330 }
1331
1332 continuousViewModel->setScrollYFromUser(value);
1333
1334 int currentPage = continuousViewModel->readingProgressPage();
1335
1336 if (currentPage != lastCenterPage && currentPage >= 0) {
1337 lastCenterPage = currentPage;
1338 continuousViewModel->setAnchorPage(currentPage);
1339 // No render->goTo() here: that drives Render's blocking page buffer and
1340 // would stall scrolling. The page provider decodes off-thread, driven by
1341 // the widget's paint. Render's current page is synced lazily (save / mode
1342 // switch) instead.
1343 updateInformation();
1344 emit pageAvailable(true);
1345 }
1346}
1347
1348void Viewer::onContinuousViewModelChanged()
1349{

Callers

nothing calls this directly

Calls 4

hasLoadedComicMethod · 0.80
setScrollYFromUserMethod · 0.80
readingProgressPageMethod · 0.80
setAnchorPageMethod · 0.80

Tested by

no test coverage detected