1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-27 07:43:50 +01:00

TrackList has back-pointer to project...

... and Track::GetOwner() is publicized, so that now you can find the
the AudacityProject, if any, that owns a given Track; this will help eliminate
some uses of GetActiveProject
This commit is contained in:
Paul Licameli
2019-05-21 11:22:19 -04:00
parent c7984a2c83
commit a93c4472f5
10 changed files with 35 additions and 24 deletions

View File

@@ -256,7 +256,7 @@ void OnCut(const CommandContext &context)
auto &clipboard = Clipboard::Get();
clipboard.Clear();
auto pNewClipboard = TrackList::Create();
auto pNewClipboard = TrackList::Create( nullptr );
auto &newClipboard = *pNewClipboard;
tracks.Selected().Visit(
@@ -361,7 +361,7 @@ void OnCopy(const CommandContext &context)
auto &clipboard = Clipboard::Get();
clipboard.Clear();
auto pNewClipboard = TrackList::Create();
auto pNewClipboard = TrackList::Create( nullptr );
auto &newClipboard = *pNewClipboard;
for (auto n : tracks.Selected()) {
@@ -681,7 +681,7 @@ void OnSplitCut(const CommandContext &context)
auto &clipboard = Clipboard::Get();
clipboard.Clear();
auto pNewClipboard = TrackList::Create();
auto pNewClipboard = TrackList::Create( nullptr );
auto &newClipboard = *pNewClipboard;
Track::Holder dest;

View File

@@ -190,7 +190,7 @@ void EditClipboardByLabel( AudacityProject &project,
auto &clipboard = Clipboard::Get();
clipboard.Clear();
auto pNewClipboard = TrackList::Create();
auto pNewClipboard = TrackList::Create( nullptr );
auto &newClipboard = *pNewClipboard;
//Apply action on wavetracks starting from