| 180 | } |
| 181 | |
| 182 | void ContinuousPageWidget::onPageAvailable(int absolutePageIndex) |
| 183 | { |
| 184 | if (!provider || !continuousViewModel || absolutePageIndex < 0 || absolutePageIndex >= continuousViewModel->numPages()) { |
| 185 | return; |
| 186 | } |
| 187 | |
| 188 | const QImage *img = provider->image(absolutePageIndex); |
| 189 | if (!img || img->isNull()) { |
| 190 | return; |
| 191 | } |
| 192 | |
| 193 | // The page's source pixels changed; drop the stale scaled image and any |
| 194 | // in-flight scale so the next paint reschedules it from the new source. |
| 195 | scaledPageCache.invalidatePage(absolutePageIndex); |
| 196 | pendingScaleRequests.remove(absolutePageIndex); |
| 197 | |
| 198 | update(pageRectFor(absolutePageIndex)); |
| 199 | } |
| 200 | |
| 201 | void ContinuousPageWidget::paintEvent(QPaintEvent *event) |
| 202 | { |
nothing calls this directly
no test coverage detected