Skip to content

Commit

Permalink
Update timelinedockwidget.cpp
Browse files Browse the repository at this point in the history
Allow modifying parameters during playback (and cache new content).

Ref: #161
  • Loading branch information
rodlie committed May 26, 2024
1 parent 11691d8 commit ec431c7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/app/GUI/timelinedockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,5 +511,15 @@ void TimelineDockWidget::updateSettingsForCurrentCanvas(Canvas* const canvas)
void TimelineDockWidget::stopPreview()
{
const auto state = RenderHandler::sInstance->currentPreviewState();
if (state != PreviewState::stopped) { interruptPreview(); }
switch (state) {
case PreviewState::paused:
interruptPreview();
break;
case PreviewState::playing:
case PreviewState::rendering:
interruptPreview();
renderPreview();
break;
default:;
}
}

0 comments on commit ec431c7

Please sign in to comment.