viewer: move set code lower and return

This commit is contained in:
itsmattkc
2021-05-05 12:53:42 +10:00
parent 7945a6b58a
commit ee90d89ef4
+7 -6
View File
@@ -484,12 +484,6 @@ void ViewerWidget::UpdateTextureFromNode()
} else {
if (playback_queue_.size() == 1) {
// This is the last frame left in the queue. Even though it's incorrect, we'll show it
// just for improved user feedback
SetDisplayImage(pf.frame, true);
}
// Skip this frame
PopOldestFrameFromPlaybackQueue();
if (popped) {
@@ -501,6 +495,13 @@ void ViewerWidget::UpdateTextureFromNode()
popped = true;
}
if (playback_queue_.empty()) {
// This was the last frame left in the queue. Even though it's old, we'll show it
// just for improved user feedback
SetDisplayImage(pf.frame, true);
return;
}
}
}
}