refine save prompt

master
zetaPRIME 2022-03-13 07:28:29 -04:00
parent bac05e3f68
commit a48e9d4583
2 changed files with 2 additions and 8 deletions

6
notes
View File

@ -34,12 +34,6 @@ TODO {
immediate frontburner {
look into performance/timing/sync of audio engine; it's having buffer issues way more than it feels like it should
- prompt save on... {
- new project
- open project (any)
- close
}
- add i/o nodes to default project
add more

View File

@ -556,8 +556,8 @@ void MainWindow::openRecentProject(size_t idx) {
bool MainWindow::promptSave() {
if (!undoStack->isClean()) {
auto ftxt = project->fileName.isEmpty() ? qs("new file") : qs("file \"%1\"").arg(project->fileName);
auto r = QMessageBox::warning(this, qs("Save file?"), qs("Save changes to %1?").arg(ftxt),
auto ftxt = project->fileName.isEmpty() ? qs("unsaved project") : qs("project \"%1\"").arg(QFileInfo(project->fileName).fileName());
auto r = QMessageBox::warning(this, qs("Unsaved changes"), qs("Save changes to %1?").arg(ftxt),
static_cast<QMessageBox::StandardButtons>(QMessageBox::Yes + QMessageBox::No + QMessageBox::Cancel));
if (r == QMessageBox::Cancel || r == QMessageBox::Escape) return true; // signal abort