mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-04-04 21:17:43 +03:00
Disable merge when database is locked
This commit is contained in:
parent
0a155d89a3
commit
2eb3159f8a
2 changed files with 8 additions and 6 deletions
|
@ -198,11 +198,14 @@ void DatabaseTabWidget::importCsv()
|
|||
|
||||
void DatabaseTabWidget::mergeDatabase()
|
||||
{
|
||||
QString filter = QString("%1 (*.kdbx);;%2 (*)").arg(tr("KeePass 2 Database"), tr("All files"));
|
||||
const QString fileName = fileDialog()->getOpenFileName(this, tr("Merge database"), QString(),
|
||||
filter);
|
||||
if (!fileName.isEmpty()) {
|
||||
mergeDatabase(fileName);
|
||||
auto dbWidget = currentDatabaseWidget();
|
||||
if (dbWidget && dbWidget->currentMode() != DatabaseWidget::LockedMode) {
|
||||
QString filter = QString("%1 (*.kdbx);;%2 (*)").arg(tr("KeePass 2 Database"), tr("All files"));
|
||||
const QString fileName = fileDialog()->getOpenFileName(this, tr("Merge database"), QString(),
|
||||
filter);
|
||||
if (!fileName.isEmpty()) {
|
||||
mergeDatabase(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue