mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-27 00:09:53 -05: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