mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix Issue #1447 by using entry's group when not creating entry
This commit is contained in:
parent
924d472de5
commit
5c51d11651
@ -819,7 +819,16 @@ void DatabaseWidget::switchToEntryEdit(Entry* entry)
|
||||
|
||||
void DatabaseWidget::switchToEntryEdit(Entry* entry, bool create)
|
||||
{
|
||||
Group* group = currentGroup();
|
||||
// If creating an entry, it will be in `currentGroup()` so it's
|
||||
// okay to use but when editing, the entry may not be in
|
||||
// `currentGroup()` so we get the entry's group.
|
||||
Group* group;
|
||||
if (create) {
|
||||
group = currentGroup();
|
||||
} else {
|
||||
group = entry->group();
|
||||
}
|
||||
|
||||
Q_ASSERT(group);
|
||||
|
||||
m_editEntryWidget->loadEntry(entry, create, false, group->name(), m_db);
|
||||
|
Loading…
Reference in New Issue
Block a user