From 4eb539b011683f772d954edd01b9b3474ac0dcff Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 30 May 2020 17:46:42 +1000 Subject: [PATCH] timebasedwidget: fixed regression that stuck "toggleshowall" in one state forever --- app/widget/timebased/timebased.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/widget/timebased/timebased.cpp b/app/widget/timebased/timebased.cpp index 2139b3903..be7bf7361 100644 --- a/app/widget/timebased/timebased.cpp +++ b/app/widget/timebased/timebased.cpp @@ -448,6 +448,8 @@ void TimeBasedWidget::ToggleShowAll() if (toggle_show_all_) { SetScale(toggle_show_all_old_scale_); scrollbar_->setValue(toggle_show_all_old_scroll_); + + // Don't have to set toggle_show_all_ because SetScale() will automatically set this to false } else { int w; @@ -464,9 +466,10 @@ void TimeBasedWidget::ToggleShowAll() SetScale(w / GetConnectedNode()->GetLength().toDouble()); scrollbar_->setValue(0); - } - toggle_show_all_ = !toggle_show_all_; + // Must explicitly do this because SetScale() will automatically set this to false + toggle_show_all_ = true; + } } void TimeBasedWidget::GoToIn()