mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Fix crash when deleting parent group of recycle bin.
In these cases delete the group instead of trying to move it to the recycle bin. Closes #520
This commit is contained in:
parent
9532bedd7d
commit
bf2fd63131
@ -493,7 +493,9 @@ void DatabaseWidget::deleteGroup()
|
||||
}
|
||||
|
||||
bool inRecylceBin = Tools::hasChild(m_db->metadata()->recycleBin(), currentGroup);
|
||||
if (inRecylceBin || !m_db->metadata()->recycleBinEnabled()) {
|
||||
bool isRecycleBin = (currentGroup == m_db->metadata()->recycleBin());
|
||||
bool isRecycleBinSubgroup = Tools::hasChild(currentGroup, m_db->metadata()->recycleBin());
|
||||
if (inRecylceBin || isRecycleBin || isRecycleBinSubgroup || !m_db->metadata()->recycleBinEnabled()) {
|
||||
QMessageBox::StandardButton result = MessageBox::question(
|
||||
this, tr("Delete group?"),
|
||||
tr("Do you really want to delete the group \"%1\" for good?")
|
||||
|
Loading…
Reference in New Issue
Block a user