GUI: proper sample errors

This commit is contained in:
tildearrow 2022-03-23 16:39:08 -05:00
parent 5a08e0d230
commit 6492eeff56
3 changed files with 12 additions and 7 deletions

View file

@ -2269,8 +2269,11 @@ bool FurnaceGUI::loop() {
}
break;
case GUI_FILE_SAMPLE_OPEN:
e->addSampleFromFile(copyOfName.c_str());
MARK_MODIFIED;
if (e->addSampleFromFile(copyOfName.c_str())==-1) {
showError(e->getLastError());
} else {
MARK_MODIFIED;
}
break;
case GUI_FILE_SAMPLE_SAVE:
if (curSample>=0 && curSample<(int)e->song.sample.size()) {