MixerSnapshots now have a path (the source from which it derived) and MixerSnapshotManager will correctly set this

This commit is contained in:
Nikolaus Gullotta 2019-07-30 15:20:45 -05:00 committed by Nikolaus Gullotta
parent 51632104fa
commit 86bc853788
No known key found for this signature in database
GPG key ID: 565F60578092AA31
3 changed files with 9 additions and 2 deletions

View file

@ -99,7 +99,10 @@ class LIBARDOUR_API MixerSnapshot
void set_id(unsigned int new_id) {id = new_id;};
std::string get_label() {return label;};
void set_label(std::string new_label) {label = new_label;};
void set_label(const std::string& new_label) {label = new_label;};
std::string get_path() {return _path;};
void set_path(const std::string& new_path) {_path = new_path;};
bool get_favorite() {return favorite;};
void set_favorite(bool yn) {favorite = yn;};
@ -130,6 +133,7 @@ class LIBARDOUR_API MixerSnapshot
std::string last_modified_with;
std::string suffix;
RecallFlags _flags;
std::string _path;
std::vector<State> route_states;
std::vector<State> group_states;

View file

@ -461,6 +461,8 @@ void MixerSnapshot::load(const string path)
return;
}
_path = path;
XMLTree tree;
tree.read(path);
@ -536,7 +538,7 @@ void MixerSnapshot::load_from_session(string path)
return;
}
}
_path = path;
XMLTree tree;
tree.read(path);

View file

@ -60,6 +60,7 @@ void MixerSnapshotManager::refresh()
MixerSnapshot* snap = new MixerSnapshot(_session, info.path);
snap->set_label(info.name);
snap->set_path(info.path);
_global_snapshots.insert(snap);
printf("Global - name: %s\n", snap->get_label().c_str());