Commit 9b4480ea authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Ignore group items when expanding/collapsing items in KeyTreeView

Group items are always top-level and do not have children, so that
they cannot be expanded/collapsed.

GnuPG-bug-id: 5175
parent 9cb84314
......@@ -302,6 +302,9 @@ void KeyTreeView::init()
return;
}
const auto &key = index.data(KeyList::KeyRole).value<GpgME::Key>();
if (key.isNull()) {
return;
}
const auto fpr = QString::fromLatin1(key.primaryFingerprint());
if (m_expandedKeys.contains(fpr)) {
......@@ -316,6 +319,9 @@ void KeyTreeView::init()
return;
}
const auto &key = index.data(KeyList::KeyRole).value<GpgME::Key>();
if (key.isNull()) {
return;
}
m_expandedKeys.removeAll(QString::fromLatin1(key.primaryFingerprint()));
m_group.writeEntry("Expanded", m_expandedKeys);
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment