mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 16:26:48 -06:00
Disable PdmUiColorEditor correctly when set to read-only.
This commit is contained in:
parent
eff3c91e4b
commit
2b28bbc0b6
@ -93,6 +93,11 @@ void PdmUiColorEditor::configureAndUpdateUi(const QString& uiConfigName)
|
||||
}
|
||||
}
|
||||
|
||||
bool isReadOnly = uiField()->isUiReadOnly(uiConfigName);
|
||||
m_colorTextLabel->setEnabled(!isReadOnly);
|
||||
m_colorSelectionButton->setEnabled(!isReadOnly);
|
||||
m_colorPreviewLabel->setEnabled(!isReadOnly);
|
||||
|
||||
QColor col = uiField()->uiValue().value<QColor>();
|
||||
setColorOnWidget(col);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user