Skip to content
Snippets Groups Projects
Commit bbe1fcf5 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

contact: Fix ::flags()

Refs #69290
parent ff9eaae3
No related branches found
No related tags found
No related merge requests found
......@@ -402,7 +402,7 @@ Qt::ItemFlags CategorizedContactModel::flags( const QModelIndex& index ) const
const ContactTreeNode* modelNode = static_cast<ContactTreeNode*>(index.internalPointer());
return (modelNode->m_pContact && modelNode->m_pContact->isActive() ? Qt::ItemIsEnabled : Qt::NoItemFlags )
return (((!modelNode->m_pContact) || (modelNode->m_pContact->isActive())) ? Qt::ItemIsEnabled : Qt::NoItemFlags )
| Qt::ItemIsSelectable
| (modelNode->m_pParent? (Qt::ItemIsDragEnabled|Qt::ItemIsDropEnabled) : Qt::ItemIsEnabled
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment