provide mechanism to report on destructive tracks presence in a session
This commit is contained in:
parent
53e743f4ae
commit
1783305077
|
@ -466,6 +466,9 @@ public:
|
|||
bool declick_in_progress () const;
|
||||
bool transport_locked () const;
|
||||
|
||||
bool had_destructive_tracks () const;
|
||||
void set_had_destructive_tracks (bool yn);
|
||||
|
||||
int wipe ();
|
||||
|
||||
samplepos_t current_end_sample () const;
|
||||
|
@ -2134,6 +2137,8 @@ private:
|
|||
|
||||
bool _global_locate_pending;
|
||||
boost::optional<samplepos_t> _nominal_jack_transport_sample;
|
||||
|
||||
bool _had_destructive_tracks;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -319,6 +319,7 @@ Session::Session (AudioEngine &eng,
|
|||
, _vca_manager (new VCAManager (*this))
|
||||
, _selection (new CoreSelection (*this))
|
||||
, _global_locate_pending (false)
|
||||
, _had_destructive_tracks (false)
|
||||
{
|
||||
created_with = string_compose ("%1 %2", PROGRAM_NAME, revision);
|
||||
|
||||
|
@ -7005,3 +7006,15 @@ Session::maybe_update_tempo_from_midiclock_tempo (float bpm)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Session::set_had_destructive_tracks (bool yn)
|
||||
{
|
||||
_had_destructive_tracks = yn;
|
||||
}
|
||||
|
||||
bool
|
||||
Session::had_destructive_tracks() const
|
||||
{
|
||||
return _had_destructive_tracks;
|
||||
}
|
||||
|
|
|
@ -169,6 +169,9 @@ Source::set_state (const XMLNode& node, int version)
|
|||
|
||||
/* Destructive is no longer valid */
|
||||
|
||||
if (_flags & Destructive) {
|
||||
_session.set_had_destructive_tracks (true);
|
||||
}
|
||||
_flags = Flag (_flags & ~Destructive);
|
||||
|
||||
if (!node.get_property (X_("take-id"), _take_id)) {
|
||||
|
@ -177,7 +180,7 @@ Source::set_state (const XMLNode& node, int version)
|
|||
|
||||
/* old style, from the period when we had DestructiveFileSource */
|
||||
if (node.get_property (X_("destructive"), str)) {
|
||||
throw (SessionException (_("This session uses destructive tracks, which are no longer supported. Please use an older version of Ardour to work with this session")));
|
||||
_session.set_had_destructive_tracks (true);
|
||||
}
|
||||
|
||||
if (version < 3000) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user