#2131 AppFwk : Tree List Selector : Allow header items to be selected

This commit is contained in:
Magne Sjaastad committed 2017-11-14 09:48:01 +01:00
1 parent cebe3009e7
commit 4e20723650
1 file changed
+6 -5
@@ -225,12 +225,13 @@ Qt::ItemFlags caf::PdmUiTreeSelectionQModel::flags(const QModelIndex &index) con
{
const caf::PdmOptionItemInfo* optionItemInfo = optionItem(index);
if (optionItemInfo->isReadOnly())
{
return QAbstractItemModel::flags(index)^Qt::ItemIsEnabled;
}
else if (!optionItemInfo->isHeading())
if (!optionItemInfo->isHeading())
{
if (optionItemInfo->isReadOnly())
{
return QAbstractItemModel::flags(index)^Qt::ItemIsEnabled;
}
return QAbstractItemModel::flags(index) | Qt::ItemIsUserCheckable;
}
}