| 1324 | } |
| 1325 | |
| 1326 | void 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 | |
| 1348 | void Viewer::onContinuousViewModelChanged() |
| 1349 | { |
nothing calls this directly
no test coverage detected