//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QStringList RimCellEdgeResultSlot::findResultVariableNames() { QStringList varNames; if (m_reservoirView && m_reservoirView->gridCellResults() && !resultVariable().isEmpty()) { QStringList varList; varList = m_reservoirView->gridCellResults()->resultNames(RimDefines::STATIC_NATIVE); //TODO: Must handle Input properties int i; for (i = 0; i < varList.size(); ++i) { if (varList[i].contains(resultVariable)) { varNames.append(varList[i]); } } } return varNames; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- QStringList RimCellEdgeColors::findResultVariableNames() { QStringList varNames; if (m_reservoirView && m_reservoirView->currentGridCellResults() && !resultVariable().isEmpty()) { QStringList varList; varList = m_reservoirView->currentGridCellResults()->cellResults()->resultNames(RimDefines::STATIC_NATIVE); //TODO: Must handle Input properties int i; for (i = 0; i < varList.size(); ++i) { if (RimDefines::isPerCellFaceResult(varList[i])) continue; if (varList[i].startsWith(resultVariable)) { varNames.append(varList[i]); } } } return varNames; }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { if ( &m_resultTypeUiField == changedField || &m_porosityModelUiField == changedField ) { QStringList varList = getResultVariableListForCurrentUIFieldSettings(); // If the user are seeing the list with the actually selected result, select that result in the list. Otherwise select nothing. if ( m_resultTypeUiField() == m_resultType() && m_porosityModelUiField() == m_porosityModel() && varList.contains(resultVariable())) { m_resultVariableUiField = resultVariable(); } else { m_resultVariableUiField = ""; } } RimEclipsePropertyFilter* propFilter = dynamic_cast<RimEclipsePropertyFilter*>(this->parentField()->ownerObject()); RimView* view = NULL; this->firstAnchestorOrThisOfType(view); RimWellLogCurve* curve = NULL; this->firstAnchestorOrThisOfType(curve); if (&m_resultVariableUiField == changedField) { m_porosityModel = m_porosityModelUiField; m_resultType = m_resultTypeUiField; m_resultVariable = m_resultVariableUiField; loadResult(); if (propFilter) { propFilter->setToDefaultValues(); propFilter->updateFilterName(); if (view) { view->scheduleGeometryRegen(PROPERTY_FILTERED); view->scheduleCreateDisplayModelAndRedraw(); } } if (dynamic_cast<RimEclipseCellColors*>(this)) { if (view) { RimViewLinker* viewLinker = view->assosiatedViewLinker(); if (viewLinker) { viewLinker->updateCellResult(); } } } if (curve) { curve->updatePlotData(); } } if (propFilter) { propFilter->updateConnectedEditors(); } RimEclipseFaultColors* faultColors = dynamic_cast<RimEclipseFaultColors*>(this->parentField()->ownerObject()); if (faultColors) { faultColors->updateConnectedEditors(); } if (curve) { curve->updateConnectedEditors(); } }