Fix playing widget stuck on error

This commit is contained in:
Jonas Kvinge
2020-09-30 00:44:40 +02:00
parent cc8ced6430
commit d94ee8863c

View File

@@ -182,16 +182,12 @@ void PlayingWidget::SetVisible(bool visible) {
if (timeline_show_hide_->state() == QTimeLine::Running) { if (timeline_show_hide_->state() == QTimeLine::Running) {
if (timeline_show_hide_->direction() == QTimeLine::Backward && enabled_ && active_) { if (timeline_show_hide_->direction() == QTimeLine::Backward && enabled_ && active_) {
timeline_show_hide_->toggleDirection(); timeline_show_hide_->toggleDirection();
return;
} }
else if (timeline_show_hide_->direction() == QTimeLine::Forward && (!enabled_ || !active_)) { else if (timeline_show_hide_->direction() == QTimeLine::Forward && (!enabled_ || !active_)) {
timeline_show_hide_->toggleDirection(); timeline_show_hide_->toggleDirection();
}
return; return;
} }
else {
timeline_show_hide_->stop();
}
}
if (visible != visible_) { if (visible != visible_) {
timeline_show_hide_->setFrameRange(0, total_height_); timeline_show_hide_->setFrameRange(0, total_height_);