restore being able to load a 5.12 session with a destructive track.
Not all is working right yet, however
This commit is contained in:
@@ -53,7 +53,8 @@ public:
|
||||
RemovableIfEmpty = 0x10,
|
||||
RemoveAtDestroy = 0x20,
|
||||
NoPeakFile = 0x40,
|
||||
/* 0x80 was Destructive */
|
||||
/* No longer in use but kept to allow loading of older sessions */
|
||||
Destructive = 0x80,
|
||||
Empty = 0x100, /* used for MIDI only */
|
||||
RF64_RIFF = 0x200,
|
||||
Missing = 0x400, /* used for MIDI only */
|
||||
|
||||
@@ -227,6 +227,8 @@ enum MeterType {
|
||||
enum TrackMode {
|
||||
Normal,
|
||||
NonLayered,
|
||||
/* No longer in use but kept to allow loading of older sessions */
|
||||
Destructive,
|
||||
};
|
||||
|
||||
enum NoteMode {
|
||||
|
||||
@@ -143,6 +143,11 @@ AudioTrack::set_state (const XMLNode& node, int version)
|
||||
_mode = Normal;
|
||||
}
|
||||
|
||||
if (_mode == Destructive) {
|
||||
/* XXX warn user */
|
||||
_mode = Normal;
|
||||
}
|
||||
|
||||
if (Track::set_state (node, version)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -248,6 +248,10 @@ setup_enum_writer ()
|
||||
|
||||
REGISTER_ENUM (Normal);
|
||||
REGISTER_ENUM (NonLayered);
|
||||
/* No longer used but we leave this here so that enumwriter can parse
|
||||
* strings containing "Destructive"
|
||||
*/
|
||||
REGISTER_ENUM (Destructive);
|
||||
REGISTER (_TrackMode);
|
||||
|
||||
REGISTER_ENUM (Sustained);
|
||||
@@ -519,6 +523,10 @@ setup_enum_writer ()
|
||||
REGISTER_CLASS_ENUM (Source, RemovableIfEmpty);
|
||||
REGISTER_CLASS_ENUM (Source, RemoveAtDestroy);
|
||||
REGISTER_CLASS_ENUM (Source, NoPeakFile);
|
||||
/* No longer used but we leave this here so that enumwriter can parse
|
||||
* strings containing "Destructive"
|
||||
*/
|
||||
REGISTER_CLASS_ENUM (Source, Destructive);
|
||||
REGISTER_CLASS_ENUM (Source, Empty);
|
||||
REGISTER_BITS (_Source_Flag);
|
||||
|
||||
|
||||
@@ -167,6 +167,10 @@ Source::set_state (const XMLNode& node, int version)
|
||||
_flags = Flag (0);
|
||||
}
|
||||
|
||||
/* Destructive is no longer valid */
|
||||
|
||||
_flags = Flag (_flags & ~Destructive);
|
||||
|
||||
if (!node.get_property (X_("take-id"), _take_id)) {
|
||||
_take_id = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user