mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 22:12:58 +02:00
Fix some failures to update the vertical scrollbar...
... Problem involves sequence in which event handlers are done, and started at
commit 278509a
which updated track Y coordinates in a handler.
Solution is to delay the updating of scrollbars further, using CallAfter.
Also remove one unnecessary call to ProjectWindow::FixScrollbars() because
ProjectWindow::HandleResize follows it and includes scrollbar update already.
This commit is contained in:
@@ -867,6 +867,8 @@ void ProjectWindow::ApplyUpdatedTheme()
|
||||
|
||||
void ProjectWindow::RedrawProject(const bool bForceWaveTracks /*= false*/)
|
||||
{
|
||||
CallAfter( [this, bForceWaveTracks]{
|
||||
|
||||
auto &project = mProject ;
|
||||
auto &tracks = TrackList::Get( project );
|
||||
auto &trackPanel = TrackPanel::Get( project );
|
||||
@@ -878,6 +880,8 @@ void ProjectWindow::RedrawProject(const bool bForceWaveTracks /*= false*/)
|
||||
clip->MarkChanged();
|
||||
}
|
||||
trackPanel.Refresh(false);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
void ProjectWindow::OnThemeChange(wxCommandEvent& evt)
|
||||
@@ -1322,9 +1326,7 @@ void ProjectWindow::HandleResize()
|
||||
return;
|
||||
}
|
||||
|
||||
FixScrollbars();
|
||||
|
||||
UpdateLayout();
|
||||
CallAfter( [this]{ FixScrollbars(), UpdateLayout(); } );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -197,7 +197,6 @@ void DoRemoveTrack(AudacityProject &project, Track * toRemove)
|
||||
name),
|
||||
_("Track Remove"));
|
||||
|
||||
window.FixScrollbars();
|
||||
window.HandleResize();
|
||||
trackPanel.Refresh(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user