mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Reset parent pointer when removing child from container
and use the issuer as parent when inserting it to put it under the correct issuer
This commit is contained in:
parent
ab17dfd52f
commit
02fc95c70b
@ -75,6 +75,7 @@ void db_base::remFromCont(const QModelIndex &idx)
|
||||
beginRemoveRows(parent(idx), row, row);
|
||||
parent_pki->takeChild(pki);
|
||||
rootItem->takeChild(pki);
|
||||
pki->setParent(nullptr);
|
||||
endRemoveRows();
|
||||
emit columnsContentChanged();
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ void db_x509::remFromCont(const QModelIndex &idx)
|
||||
child = dynamic_cast<pki_x509*>(pki->takeFirst());
|
||||
child->delSigner(dynamic_cast<pki_x509*>(pki));
|
||||
new_parent = child->findIssuer();
|
||||
insertChild(child);
|
||||
insertChild(child, new_parent);
|
||||
if (new_parent)
|
||||
childs << child;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user