diff options
author | Robin Gareus <robin@gareus.org> | 2019-03-18 15:33:05 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-03-18 15:36:58 +0100 |
commit | 4706201425e9ce7d8f4609cb920f4b28f261ee63 (patch) | |
tree | c802301407df9d92f307cd76feccc1bcd9ef2a2c /libs/ardour/ardour/session.h | |
parent | bd9d848058cd4b157388e9c8ef2f781554447d2a (diff) |
NO-OP: Use API to set/test state-of-the-state
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r-- | libs/ardour/ardour/session.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 560ccbf2c4..d744cd1d0e 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -213,16 +213,21 @@ public: bool path_is_within_session (const std::string&); bool writable() const { return _writable; } - void set_dirty (); - void set_clean (); - bool dirty() const { return _state_of_the_state & Dirty; } - void set_deletion_in_progress (); - void clear_deletion_in_progress (); - bool reconnection_in_progress() const { return _reconnecting_routes_in_progress; } - bool deletion_in_progress() const { return _state_of_the_state & Deletion; } - bool routes_deletion_in_progress() const { return _route_deletion_in_progress; } - bool peaks_cleanup_in_progres() const { return _state_of_the_state & PeakCleanup; } - bool loading () const { return _state_of_the_state & Loading; } + void set_clean (); // == Clean and emit DirtyChanged IFF session was Dirty + void set_dirty (); // |= Dirty and emit DirtyChanged (unless already dirty or Loading, Deletion) + void unset_dirty (bool emit_dirty_changed = false); // &= ~Dirty + void set_deletion_in_progress (); // |= Deletion + void clear_deletion_in_progress (); // &= ~Deletion + + bool reconnection_in_progress () const { return _reconnecting_routes_in_progress; } + bool routes_deletion_in_progress () const { return _route_deletion_in_progress; } + bool dirty () const { return _state_of_the_state & Dirty; } + bool deletion_in_progress () const { return _state_of_the_state & Deletion; } + bool peaks_cleanup_in_progres () const { return _state_of_the_state & PeakCleanup; } + bool loading () const { return _state_of_the_state & Loading; } + bool cannot_save () const { return _state_of_the_state & CannotSave; } + bool in_cleanup () const { return _state_of_the_state & InCleanup; } + bool inital_connect_or_deletion_in_progress () { return _state_of_the_state & (InitialConnecting | Deletion); } PBD::Signal0<void> DirtyChanged; @@ -583,8 +588,6 @@ public: PeakCleanup = 0x40 }; - StateOfTheState state_of_the_state() const { return _state_of_the_state; } - class StateProtector { public: StateProtector (Session* s) : _session (s) { |