mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -05: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);
|
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…
Reference in New Issue
Block a user