mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1895 Curve Creator : Added documentation
This commit is contained in:
@@ -330,7 +330,7 @@ protected:
|
||||
caf::PdmUiTreeSelectionEditorAttribute* attr = dynamic_cast<caf::PdmUiTreeSelectionEditorAttribute*>(attribute);
|
||||
if (attr)
|
||||
{
|
||||
attr->highLightField = m_highlightedEnum.uiCapability();
|
||||
attr->fieldToReceiveCurrentFieldValue = m_highlightedEnum.uiCapability();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,13 +409,11 @@ void PdmUiTreeSelectionEditor::slotTextFilterChanged()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTreeSelectionEditor::slotCurrentChanged(const QModelIndex & current, const QModelIndex & previous)
|
||||
{
|
||||
if (m_attributes.highLightField)
|
||||
if (m_attributes.fieldToReceiveCurrentFieldValue)
|
||||
{
|
||||
QVariant v = m_proxyModel->data(current, PdmUiTreeSelectionQModel::optionItemValueRole());
|
||||
|
||||
//m_attributes.highLightField->fieldHandle()->setvalue();
|
||||
|
||||
PdmUiCommandSystemProxy::instance()->setUiValueToField(m_attributes.highLightField, v);
|
||||
PdmUiCommandSystemProxy::instance()->setUiValueToField(m_attributes.fieldToReceiveCurrentFieldValue, v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,11 @@ public:
|
||||
bool showTextFilter;
|
||||
bool showToggleAllCheckbox;
|
||||
|
||||
caf::PdmUiFieldHandle* highLightField;
|
||||
/// fieldToReceiveCurrentFieldValue is used to communicate the value of current item in the tree view
|
||||
/// This is useful when displaying a list of appEnums, and a dependent view is displaying content based on
|
||||
/// the current item in the tree view
|
||||
/// Make sure the type of the receiving field is of the same type as the field used in PdmUiTreeSelectionEditor
|
||||
caf::PdmUiFieldHandle* fieldToReceiveCurrentFieldValue;
|
||||
|
||||
public:
|
||||
PdmUiTreeSelectionEditorAttribute()
|
||||
@@ -70,7 +74,7 @@ public:
|
||||
showTextFilter = true;
|
||||
showToggleAllCheckbox = true;
|
||||
|
||||
highLightField = nullptr;
|
||||
fieldToReceiveCurrentFieldValue = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user