mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 14:45:43 +01:00
notify the user if a promoted snapshot will overwrite something in the global snapshots list
This commit is contained in:
parent
4a085b91f5
commit
bb9b4119e2
3 changed files with 87 additions and 32 deletions
|
|
@ -107,10 +107,12 @@ bool MixerSnapshotManager::promote(MixerSnapshot* snapshot) {
|
|||
|
||||
const string path = snapshot->get_path();
|
||||
if(Glib::file_test(path.c_str(), Glib::FILE_TEST_EXISTS)) {
|
||||
const string label = snapshot->get_label();
|
||||
//write out this snapshot to the global path
|
||||
snapshot->write(_global_path);
|
||||
|
||||
//that might've overwritten a file, erase it's reference
|
||||
const string label = snapshot->get_label();
|
||||
|
||||
MixerSnapshot* old_snapshot = get_snapshot_by_name(label, true);
|
||||
set<MixerSnapshot*>::iterator iter = _global_snapshots.find(old_snapshot);
|
||||
if(iter != _global_snapshots.end()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue