mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 23:53:04 -06:00
#3735 Summary plot : Improve stepping for well path name
This commit is contained in:
parent
ceb5fff780
commit
314c20a04a
@ -517,6 +517,26 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::ensembleStatisticsAddress(con
|
|||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RifEclipseSummaryAddress::isDependentOnWellName(const RifEclipseSummaryAddress& address)
|
||||||
|
{
|
||||||
|
// clang-format off
|
||||||
|
if (address.category() == SUMMARY_WELL ||
|
||||||
|
address.category() == SUMMARY_WELL_COMPLETION ||
|
||||||
|
address.category() == SUMMARY_WELL_COMPLETION_LGR ||
|
||||||
|
address.category() == SUMMARY_WELL_LGR ||
|
||||||
|
address.category() == SUMMARY_WELL_SEGMENT)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -144,6 +144,8 @@ public:
|
|||||||
static RifEclipseSummaryAddress importedAddress(const std::string& quantityName);
|
static RifEclipseSummaryAddress importedAddress(const std::string& quantityName);
|
||||||
static RifEclipseSummaryAddress ensembleStatisticsAddress(const std::string& quantityName, const std::string& dataQuantityName);
|
static RifEclipseSummaryAddress ensembleStatisticsAddress(const std::string& quantityName, const std::string& dataQuantityName);
|
||||||
|
|
||||||
|
static bool isDependentOnWellName(const RifEclipseSummaryAddress& address);
|
||||||
|
|
||||||
// Access methods
|
// Access methods
|
||||||
|
|
||||||
SummaryVarCategory category() const { return m_variableCategory; }
|
SummaryVarCategory category() const { return m_variableCategory; }
|
||||||
|
@ -44,7 +44,8 @@ CAF_PDM_SOURCE_INIT(RimSummaryPlotSourceStepping, "RimSummaryCurveCollectionModi
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimSummaryPlotSourceStepping::RimSummaryPlotSourceStepping() : m_sourceSteppingType(Y_AXIS)
|
RimSummaryPlotSourceStepping::RimSummaryPlotSourceStepping()
|
||||||
|
: m_sourceSteppingType(Y_AXIS)
|
||||||
{
|
{
|
||||||
// clang-format off
|
// clang-format off
|
||||||
CAF_PDM_InitObject("Summary Curves Modifier", "", "", "");
|
CAF_PDM_InitObject("Summary Curves Modifier", "", "", "");
|
||||||
@ -244,8 +245,9 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue,
|
void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||||
const QVariant& newValue)
|
const QVariant& oldValue,
|
||||||
|
const QVariant& newValue)
|
||||||
{
|
{
|
||||||
RimSummaryCurveCollection* curveCollection = nullptr;
|
RimSummaryCurveCollection* curveCollection = nullptr;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
||||||
@ -286,7 +288,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* c
|
|||||||
if (isYAxisStepping())
|
if (isYAxisStepping())
|
||||||
{
|
{
|
||||||
RifEclipseSummaryAddress adr = curve->summaryAddressY();
|
RifEclipseSummaryAddress adr = curve->summaryAddressY();
|
||||||
if (adr.category() == RifEclipseSummaryAddress::SUMMARY_WELL)
|
if (RifEclipseSummaryAddress::isDependentOnWellName(adr))
|
||||||
{
|
{
|
||||||
adr.setWellName(m_wellName().toStdString());
|
adr.setWellName(m_wellName().toStdString());
|
||||||
|
|
||||||
@ -297,7 +299,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* c
|
|||||||
if (isXAxisStepping())
|
if (isXAxisStepping())
|
||||||
{
|
{
|
||||||
RifEclipseSummaryAddress adr = curve->summaryAddressX();
|
RifEclipseSummaryAddress adr = curve->summaryAddressX();
|
||||||
if (adr.category() == RifEclipseSummaryAddress::SUMMARY_WELL)
|
if (RifEclipseSummaryAddress::isDependentOnWellName(adr))
|
||||||
{
|
{
|
||||||
adr.setWellName(m_wellName().toStdString());
|
adr.setWellName(m_wellName().toStdString());
|
||||||
|
|
||||||
@ -417,7 +419,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* c
|
|||||||
std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryReadersForCurves() const
|
std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryReadersForCurves() const
|
||||||
{
|
{
|
||||||
std::vector<RifSummaryReaderInterface*> readers;
|
std::vector<RifSummaryReaderInterface*> readers;
|
||||||
RimSummaryCurveCollection* curveCollection = nullptr;
|
RimSummaryCurveCollection* curveCollection = nullptr;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
||||||
|
|
||||||
for (auto curve : curveCollection->curves())
|
for (auto curve : curveCollection->curves())
|
||||||
@ -646,7 +648,7 @@ RiaSummaryCurveAnalyzer* RimSummaryPlotSourceStepping::analyzerForReader(RifSumm
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlotSourceStepping::modifyCurrentIndex(caf::PdmValueField* valueField, int indexOffset)
|
void RimSummaryPlotSourceStepping::modifyCurrentIndex(caf::PdmValueField* valueField, int indexOffset)
|
||||||
{
|
{
|
||||||
bool useOptionsOnly;
|
bool useOptionsOnly;
|
||||||
QList<caf::PdmOptionItemInfo> options = calculateValueOptions(valueField, &useOptionsOnly);
|
QList<caf::PdmOptionItemInfo> options = calculateValueOptions(valueField, &useOptionsOnly);
|
||||||
RimDataSourceSteppingTools::modifyCurrentIndex(valueField, options, indexOffset);
|
RimDataSourceSteppingTools::modifyCurrentIndex(valueField, options, indexOffset);
|
||||||
}
|
}
|
||||||
@ -654,7 +656,8 @@ void RimSummaryPlotSourceStepping::modifyCurrentIndex(caf::PdmValueField* valueF
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryPlotSourceStepping::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName,
|
void RimSummaryPlotSourceStepping::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
caf::PdmUiEditorAttribute* attribute)
|
caf::PdmUiEditorAttribute* attribute)
|
||||||
{
|
{
|
||||||
caf::PdmUiComboBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>(attribute);
|
caf::PdmUiComboBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>(attribute);
|
||||||
|
Loading…
Reference in New Issue
Block a user