From 27cb7c88853ee26761c9056851582fad2aaa051c Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Fri, 8 Mar 2019 20:13:24 +1100 Subject: [PATCH] fixed #611 --- panels/timeline.cpp | 23 +++++++++++++++-------- panels/timeline.h | 1 + 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/panels/timeline.cpp b/panels/timeline.cpp index f0ce8d905..4a975a886 100644 --- a/panels/timeline.cpp +++ b/panels/timeline.cpp @@ -812,19 +812,26 @@ void Timeline::SetTrackHeight(int track, int height) { track_heights.append(t); } -void Timeline::IncreaseTrackHeight() { - for (int i=0;igetTrackLimits(&min_track, &max_track); + + // for each active track, set the track to increase/decrease based on `diff` + for (int i=min_track;i<=max_track;i++) { + SetTrackHeight(i, qMax(GetTrackHeight(i) + diff, olive::timeline::kTrackMinHeight)); } + + // update the timeline repaint_timeline(); } +void Timeline::IncreaseTrackHeight() { + ChangeTrackHeightUniformly(olive::timeline::kTrackHeightIncrement); +} + void Timeline::DecreaseTrackHeight() { - for (int i=0;i tool_buttons; void decheck_tool_buttons(QObject* sender);