mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -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
@ -138,10 +138,14 @@ bool DatabaseTabWidget::closeDatabase(Database* db)
|
||||
int index = databaseIndex(db);
|
||||
Q_ASSERT(index != -1);
|
||||
if (dbStruct.modified) {
|
||||
QString dbName = tabText(index);
|
||||
if (dbName.right(1) == "*") {
|
||||
dbName.chop(1);
|
||||
}
|
||||
QMessageBox::StandardButton result =
|
||||
QMessageBox::question(
|
||||
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);
|
||||
if (result == QMessageBox::Yes) {
|
||||
saveDatabase(db);
|
||||
|
Loading…
Reference in New Issue
Block a user