#1895 Curve Creator : Added documentation

This commit is contained in:
Magne Sjaastad committed 2017-09-20 10:06:57 +02:00
1 parent 5ddb796059
commit f61122ce0e
3 files changed
+9 -7

No files matched your search

@@ -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;
}
};