mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-24 23:09:44 -05:00
Fix DatabaseTabWidget::lockDatabases returns false even when all tabs are locked
This commit is contained in:
parent
443614a375
commit
1fbddf4149
@ -627,7 +627,8 @@ DatabaseWidget* DatabaseTabWidget::currentDatabaseWidget()
|
||||
bool DatabaseTabWidget::lockDatabases()
|
||||
{
|
||||
int numLocked = 0;
|
||||
for (int i = 0, c = count(); i < c; ++i) {
|
||||
int c = count();
|
||||
for (int i = 0; i < c; ++i) {
|
||||
auto dbWidget = databaseWidgetFromIndex(i);
|
||||
if (dbWidget->lock()) {
|
||||
++numLocked;
|
||||
@ -638,7 +639,7 @@ bool DatabaseTabWidget::lockDatabases()
|
||||
}
|
||||
}
|
||||
|
||||
return numLocked == count();
|
||||
return numLocked == c;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user