diff options
author | Felix Geyer <debfx@fobos.de> | 2016-08-01 01:22:04 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2016-10-03 04:45:54 +0300 |
commit | 8a50ee8b220e7f83939506e8ac94422f0d7a771a (patch) | |
tree | 25ebaf0092f8b82ebd30eade8bde57e4925e5742 /src/gui/DatabaseTabWidget.cpp | |
parent | cf8186312ab609271653dd525e52b75a01ca1705 (diff) |
Close database without asking when unmodified.
Don't ask for confirmation when closing/locking a database and
- it's in edit entry mode
- there haven't been any modifications
Refs #511
Diffstat (limited to 'src/gui/DatabaseTabWidget.cpp')
-rw-r--r-- | src/gui/DatabaseTabWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index 8f7350767..d9984d33c 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -223,7 +223,7 @@ bool DatabaseTabWidget::closeDatabase(Database* db) if (dbName.right(1) == "*") { dbName.chop(1); } - if (dbStruct.dbWidget->isInEditMode() && db->hasKey()) { + if (dbStruct.dbWidget->isInEditMode() && db->hasKey() && dbStruct.dbWidget->isEditWidgetModified()) { QMessageBox::StandardButton result = MessageBox::question( this, tr("Close?"), @@ -654,7 +654,7 @@ void DatabaseTabWidget::lockDatabases() // show the correct tab widget before we are asking questions about it setCurrentWidget(dbWidget); - if (mode == DatabaseWidget::EditMode) { + if (mode == DatabaseWidget::EditMode && dbWidget->isEditWidgetModified()) { QMessageBox::StandardButton result = MessageBox::question( this, tr("Lock database"), |