From 8bf1bb051720c28bb10a32e5f6407e0daa791236 Mon Sep 17 00:00:00 2001 From: Amir Pakdel Date: Tue, 12 May 2015 13:46:48 -0400 Subject: [PATCH] Bug #283 Updated messages related to saivng and closing a database to make them more clear about what is going to happen. --- src/gui/DatabaseTabWidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index f55269fd5..de153f995 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -197,9 +197,9 @@ bool DatabaseTabWidget::closeDatabase(Database* db) QMessageBox::StandardButton result = MessageBox::question( this, tr("Close?"), - tr("\"%1\" is in edit mode.\nClose anyway?").arg(dbName), - QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); - if (result == QMessageBox::No) { + tr("\"%1\" is in edit mode.\nDiscard changes and close anyway?").arg(dbName), + QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel); + if (result == QMessageBox::Cancel) { return false; } } @@ -212,7 +212,7 @@ bool DatabaseTabWidget::closeDatabase(Database* db) MessageBox::question( this, tr("Save changes?"), tr("\"%1\" was modified.\nSave changes?").arg(dbName), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes); + QMessageBox::Yes | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Yes); if (result == QMessageBox::Yes) { saveDatabase(db); }