mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-25 23:21:03 -04:00
Fix database name showing a star at the end when asking to save changes.
This commit is contained in:
parent
8b62365f8e
commit
73e1104442
1 changed files with 5 additions and 1 deletions
|
@ -138,10 +138,14 @@ bool DatabaseTabWidget::closeDatabase(Database* db)
|
||||||
int index = databaseIndex(db);
|
int index = databaseIndex(db);
|
||||||
Q_ASSERT(index != -1);
|
Q_ASSERT(index != -1);
|
||||||
if (dbStruct.modified) {
|
if (dbStruct.modified) {
|
||||||
|
QString dbName = tabText(index);
|
||||||
|
if (dbName.right(1) == "*") {
|
||||||
|
dbName.chop(1);
|
||||||
|
}
|
||||||
QMessageBox::StandardButton result =
|
QMessageBox::StandardButton result =
|
||||||
QMessageBox::question(
|
QMessageBox::question(
|
||||||
this, tr("Save changes?"),
|
this, tr("Save changes?"),
|
||||||
tr("\"%1\" was modified.\nSave changes?").arg(tabText(index)),
|
tr("\"%1\" was modified.\nSave changes?").arg(dbName),
|
||||||
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
|
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::Yes);
|
||||||
if (result == QMessageBox::Yes) {
|
if (result == QMessageBox::Yes) {
|
||||||
saveDatabase(db);
|
saveDatabase(db);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue