summaryrefslogtreecommitdiff
path: root/src/filelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/filelist.cc')
-rw-r--r--src/filelist.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/filelist.cc b/src/filelist.cc
index 7b2ec2b..b9b1462 100644
--- a/src/filelist.cc
+++ b/src/filelist.cc
@@ -475,6 +475,12 @@ void FileList::removeFile()
{
auto audiofile_ids = instrument.getAudioFileList();
auto audiofile_id = audiofile_ids.begin() + currentIndex().row();
+ auto& audiofile = instrument.getAudioFile(*audiofile_id);
+ if(instrument.getMasterFile() == audiofile.getAbsoluteFile())
+ {
+ emit masterFileChanged(""); // Clear canvas
+ }
+
instrument.deleteAudioFile(*audiofile_id);
//emit fileRemoved(file, name);
@@ -490,5 +496,6 @@ void FileList::removeAllFiles()
}
reset();
+ emit masterFileChanged(""); // Clear canvas
emit allFilesRemoved();
}