1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

Bug2588: Amend the fix at 3c76cea to be safe during append-record

This commit is contained in:
Paul Licameli 2020-11-24 13:35:21 -05:00
parent 5ebfe4670c
commit 8e28a257a5
3 changed files with 18 additions and 8 deletions

View File

@ -637,6 +637,15 @@ void SpectrumView::Draw(
{
if ( iPass == TrackArtist::PassTracks ) {
auto &dc = context.dc;
// Update cache for locations, e.g. cutlines and merge points
// Bug2588: do this for both channels, even if one is not drawn, so that
// cut-line editing (which depends on the locations cache) works properly.
// If both channels are visible, we will duplicate this effort, but that
// matters little.
for( auto channel:
TrackList::Channels(static_cast<WaveTrack*>(FindTrack().get())) )
channel->UpdateLocationsCache();
const auto wt = std::static_pointer_cast<const WaveTrack>(
FindTrack()->SubstitutePendingChangedTrack());

View File

@ -728,14 +728,6 @@ void WaveTrackSubView::DrawBoldBoundaries(
auto &dc = context.dc;
const auto artist = TrackArtist::Get( context );
// Update cache for locations, e.g. cutlines and merge points
// Bug2588: do this for both channels, even if one is not drawn, so that
// cut-line editing (which depends on the locations cache) works properly.
// If both channels are visible, we will duplicate this effort, but that
// matters little.
for( auto channel: TrackList::Channels(track))
channel->UpdateLocationsCache();
const auto &zoomInfo = *artist->pZoomInfo;
#ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING

View File

@ -1008,6 +1008,15 @@ void WaveformView::Draw(
{
if ( iPass == TrackArtist::PassTracks ) {
auto &dc = context.dc;
// Update cache for locations, e.g. cutlines and merge points
// Bug2588: do this for both channels, even if one is not drawn, so that
// cut-line editing (which depends on the locations cache) works properly.
// If both channels are visible, we will duplicate this effort, but that
// matters little.
for( auto channel:
TrackList::Channels(static_cast<WaveTrack*>(FindTrack().get())) )
channel->UpdateLocationsCache();
const auto wt = std::static_pointer_cast<const WaveTrack>(
FindTrack()->SubstitutePendingChangedTrack());