| 1474 | } |
| 1475 | |
| 1476 | void splitViewWidget::playbackStarted(int nextFrameIdx) |
| 1477 | { |
| 1478 | if (!this->isMasterView) |
| 1479 | return; |
| 1480 | |
| 1481 | assert(nextFrameIdx >= 0); |
| 1482 | |
| 1483 | auto item = playlist->getSelectedItems(); |
| 1484 | int frameIdx = playback->getCurrentFrame(); |
| 1485 | if (item[0]) |
| 1486 | { |
| 1487 | if (item[0]->needsLoading(nextFrameIdx, false) == ItemLoadingState::LoadingNeeded) |
| 1488 | { |
| 1489 | // The current frame is loaded but the double buffer is not loaded yet. Start loading it. |
| 1490 | DEBUG_LOAD_DRAW("splitViewWidget::playbackStarted item 0 load frame " << frameIdx); |
| 1491 | cache->loadFrame(item[0], frameIdx, 0); |
| 1492 | } |
| 1493 | } |
| 1494 | if (isSplitting() && item[1]) |
| 1495 | { |
| 1496 | if (item[1]->needsLoading(nextFrameIdx, false) == ItemLoadingState::LoadingNeeded) |
| 1497 | { |
| 1498 | // The current frame is loaded but the double buffer is not loaded yet. Start loading it. |
| 1499 | DEBUG_LOAD_DRAW("splitViewWidget::playbackStarted item 1 load frame " << frameIdx); |
| 1500 | cache->loadFrame(item[1], frameIdx, 1); |
| 1501 | } |
| 1502 | } |
| 1503 | } |
| 1504 | |
| 1505 | void splitViewWidget::update(bool newFrame, bool itemRedraw) |
| 1506 | { |
no test coverage detected