1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Define TrackView::Copy, cause all track duplications to invoke it...

... but it does nothing yet.

This will be important to preserve undo/redo behavior of view changes, when
view state is moved out of the proper Track objects.
This commit is contained in:
Paul Licameli
2019-06-16 09:19:44 -04:00
parent 79191d985d
commit c8b62f5d8a
3 changed files with 12 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ and TimeTrack.
#include "TrackPanel.h" // for TrackInfo
#include "tracks/ui/TrackView.h"
#ifdef _MSC_VER
//Disable truncation warnings
#pragma warning( disable : 4786 )
@@ -120,7 +122,9 @@ Track::Holder Track::Duplicate() const
// invoke "virtual constructor" to copy track object proper:
auto result = Clone();
// other steps to be added here
if (mpView)
// Copy view state that might be important to undo/redo
TrackView::Get( *result ).Copy( *mpView );
return result;
}