mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed issue related to missing legend config
Must hide legend config collection. Revisit when a more robust tree building strategy is in place. p4#: 22092
This commit is contained in:
parent
3bef117e7d
commit
50777b3e3f
@ -66,11 +66,14 @@ RimResultSlot::~RimResultSlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void RimResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
if (changedField == &m_resultVariable)
|
RimResultDefinition::fieldChangedByUi(changedField, oldValue, newValue);
|
||||||
|
|
||||||
|
// Update of legend config must happen after RimResultDefinition::fieldChangedByUi(), as this function modifies this->resultVariable()
|
||||||
|
if (changedField == &m_resultVariableUiField)
|
||||||
{
|
{
|
||||||
if (oldValue != newValue)
|
if (oldValue != newValue)
|
||||||
{
|
{
|
||||||
changeLegendConfig(this->resultVariable());
|
changeLegendConfig(this->resultVariable());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newValue != RimDefines::undefinedResultName())
|
if (newValue != RimDefines::undefinedResultName())
|
||||||
@ -79,8 +82,6 @@ void RimResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RimResultDefinition::fieldChangedByUi(changedField, oldValue, newValue);
|
|
||||||
|
|
||||||
if (m_reservoirView) m_reservoirView->createDisplayModelAndRedraw();
|
if (m_reservoirView) m_reservoirView->createDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,6 +552,14 @@ PdmUiTreeItem* UiTreeItemBuilderPdm::buildViewItems(PdmUiTreeItem* parentTreeIte
|
|||||||
{
|
{
|
||||||
caf::PdmFieldHandle* field = *it;
|
caf::PdmFieldHandle* field = *it;
|
||||||
|
|
||||||
|
// Fix for hidden legend definitions. There is only one visible legend definition, the others reside in a hidden container
|
||||||
|
// Todo: This is a Hack. Must be rewritten when a more general ui tree building method is in place.
|
||||||
|
// See comment at top of this method.
|
||||||
|
if (field->isUiHidden())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<caf::PdmObject*> children;
|
std::vector<caf::PdmObject*> children;
|
||||||
field->childObjects(&children);
|
field->childObjects(&children);
|
||||||
size_t i;
|
size_t i;
|
||||||
|
Loading…
Reference in New Issue
Block a user