mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Don't show error message when trying to reload a locked database
This commit is contained in:
@@ -1061,8 +1061,7 @@ void DatabaseWidget::reloadDatabaseFile()
|
|||||||
// Merge the old database into the new one
|
// Merge the old database into the new one
|
||||||
m_db->setEmitModified(false);
|
m_db->setEmitModified(false);
|
||||||
db->merge(m_db);
|
db->merge(m_db);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Since we are accepting the new file as-is, internally mark as unmodified
|
// Since we are accepting the new file as-is, internally mark as unmodified
|
||||||
// TODO: when saving is moved out of DatabaseTabWidget, this should be replaced
|
// TODO: when saving is moved out of DatabaseTabWidget, this should be replaced
|
||||||
m_databaseModified = false;
|
m_databaseModified = false;
|
||||||
@@ -1086,16 +1085,9 @@ void DatabaseWidget::reloadDatabaseFile()
|
|||||||
restoreGroupEntryFocus(groupBeforeReload, entryBeforeReload);
|
restoreGroupEntryFocus(groupBeforeReload, entryBeforeReload);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
} else {
|
||||||
MessageBox::critical(this, tr("Autoreload Failed"),
|
|
||||||
tr("Could not parse or unlock the new database file while attempting"
|
|
||||||
" to autoreload this database."));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
MessageBox::critical(this, tr("Autoreload Failed"),
|
MessageBox::critical(this, tr("Autoreload Failed"),
|
||||||
tr("Could not open the new database file while attempting to autoreload"
|
tr("Could not open the new database file while attempting to autoreload this database."));
|
||||||
" this database."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rewatch the database file
|
// Rewatch the database file
|
||||||
|
|||||||
Reference in New Issue
Block a user