add PromotedSnapshot signal to manager, and subscribe to this this in the global MixerSnapshotList

This commit is contained in:
Nikolaus Gullotta 2019-08-14 14:05:05 -05:00 committed by Nikolaus Gullotta
parent 132e895b18
commit 4a085b91f5
No known key found for this signature in database
GPG key ID: 565F60578092AA31
4 changed files with 21 additions and 2 deletions

View file

@ -27,6 +27,8 @@
#include "ardour/mixer_snapshot.h"
#include "ardour/session.h"
#include "pbd/signals.h"
namespace ARDOUR {
typedef std::set<MixerSnapshot*> SnapshotList;
@ -56,6 +58,8 @@ public:
void refresh();
void clear() { _global_snapshots.clear(); _local_snapshots.clear(); };
PBD::Signal1<void, ARDOUR::MixerSnapshot*> PromotedSnapshot;
private:
void ensure_snapshot_dir(bool global);
std::string _global_path;

View file

@ -128,6 +128,7 @@ bool MixerSnapshotManager::promote(MixerSnapshot* snapshot) {
//insert the new snapshot
_global_snapshots.insert(new_snap);
PromotedSnapshot(new_snap); /* EMIT SIGNAL */
return true;
}
return false;