mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Read only checkboxes in table view, now is rendered disabled
This commit is contained in:
parent
e3c7b4ffa4
commit
979882da03
@ -135,9 +135,16 @@ Qt::ItemFlags PdmUiTableViewQModel::flags(const QModelIndex &index) const
|
||||
PdmUiFieldHandle* uiFieldHandle = getUiFieldHandle(index);
|
||||
if (uiFieldHandle)
|
||||
{
|
||||
if (uiFieldHandle->isUiReadOnly(m_currentConfigName))
|
||||
if ( uiFieldHandle->isUiReadOnly(m_currentConfigName) )
|
||||
{
|
||||
flagMask = flagMask ^ Qt::ItemIsEditable;
|
||||
if ( flagMask & Qt::ItemIsUserCheckable )
|
||||
{
|
||||
flagMask = flagMask & (~Qt::ItemIsEnabled);
|
||||
}
|
||||
else
|
||||
{
|
||||
flagMask = flagMask ^ Qt::ItemIsEditable; // To make it selectable, but not editable
|
||||
}
|
||||
}
|
||||
}
|
||||
return flagMask;
|
||||
|
Loading…
Reference in New Issue
Block a user