mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
#2131 AppFwk : Tree List Selector : Allow header items to be selected
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user