1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-15 09:01:12 +01:00

Undoing and redoing of Tags...

Use reference counting (in std::shared_ptr) to avoid replicating Tags with each
Undo state.
This commit is contained in:
Paul Licameli
2016-02-11 11:03:12 -05:00
parent e12a060751
commit 88eeebcb8b
10 changed files with 109 additions and 27 deletions

View File

@@ -185,7 +185,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
DirManager *GetDirManager();
TrackFactory *GetTrackFactory();
AdornedRulerPanel *GetRulerPanel();
Tags *GetTags();
const Tags *GetTags();
int GetAudioIOToken() const;
bool IsAudioActive() const;
void SetAudioIOToken(int token);
@@ -526,7 +526,10 @@ public:
wxMenu *mRecentFilesMenu;
// Tags (artist name, song properties, MP3 ID3 info, etc.)
Tags *mTags;
// The structure may be shared with undo history entries
// To keep undo working correctly, always replace this with a new duplicate
// BEFORE doing any editing of it!
std::shared_ptr<Tags> mTags;
// List of tracks and display info
TrackList *mTracks;