From cc1c395b333c53cf5b1d7c81809371aedf9846d7 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Mon, 15 Jun 2020 14:35:26 +0100 Subject: [PATCH] Bug 2477 - visibility of newly added focused track Problem: Newly added track which is set as the focus can be only partially visible or invisible. If TrackPanel::OnEnsureVisible is called after a new track has been added, then in that function the line: mListener->TP_ScrollUpDown(height); can lead to incorrect results, as the vertical scrollbars have not yet been updated to take into account the additional track. Fix: Update the scrollbars in TrackPanel::OnTrackListResizing(). --- src/TrackPanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 529f8bf08..cf98538ae 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -699,6 +699,9 @@ void TrackPanel::OnTrackListResizing(TrackListEvent & e) if( t && t->HasOwner() ) UpdateVRuler(t.get()); e.Skip(); + + // fix for bug 2477 + mListener->TP_RedrawScrollbars(); } // Tracks have been removed from the list.