mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/2018.01.01-patch' into dev
This commit is contained in:
@@ -97,29 +97,29 @@ std::set<RifEclipseSummaryAddress::SummaryVarCategory> RiaSummaryCurveAnalyzer::
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<QString> RiaSummaryCurveAnalyzer::identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const
|
||||
std::vector<QString> RiaSummaryCurveAnalyzer::identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const
|
||||
{
|
||||
std::set<QString> stringSet;
|
||||
std::vector<QString> stringSet;
|
||||
|
||||
if (category == RifEclipseSummaryAddress::SUMMARY_REGION)
|
||||
{
|
||||
for (const auto& regionNumber : m_regionNumbers)
|
||||
{
|
||||
stringSet.insert(QString::number(regionNumber));
|
||||
stringSet.push_back(QString::number(regionNumber));
|
||||
}
|
||||
}
|
||||
else if (category == RifEclipseSummaryAddress::SUMMARY_WELL)
|
||||
{
|
||||
for (const auto& wellName : m_wellNames)
|
||||
{
|
||||
stringSet.insert(QString::fromStdString(wellName));
|
||||
stringSet.push_back(QString::fromStdString(wellName));
|
||||
}
|
||||
}
|
||||
else if (category == RifEclipseSummaryAddress::SUMMARY_WELL_GROUP)
|
||||
{
|
||||
for (const auto& wellGroupName : m_wellGroupNames)
|
||||
{
|
||||
stringSet.insert(QString::fromStdString(wellGroupName));
|
||||
stringSet.push_back(QString::fromStdString(wellGroupName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
|
||||
std::set<QString> identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const;
|
||||
std::vector<QString> identifierTexts(RifEclipseSummaryAddress::SummaryVarCategory category) const;
|
||||
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory(const std::vector<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category);
|
||||
|
||||
@@ -510,8 +510,10 @@ void RicSummaryCurveCreator::populateCurveCreator(const RimSummaryPlot& sourceSu
|
||||
curve->setCurveVisiblity(false);
|
||||
}
|
||||
|
||||
m_previewPlot->copyAxisPropertiesFromOther(sourceSummaryPlot);
|
||||
m_previewPlot->enableAutoPlotTitle(sourceSummaryPlot.autoPlotTitle());
|
||||
m_previewPlot->updatePlotTitle();
|
||||
m_previewPlot->updateAxes();
|
||||
|
||||
m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions(curveDefs);
|
||||
|
||||
|
||||
@@ -253,6 +253,7 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
RimWellLogTrack* plotTrack = new RimWellLogTrack();
|
||||
|
||||
plotTrack->setDescription(QString("Branch %1").arg(brIdx + 1));
|
||||
plotTrack->setFormationsForCaseWithSimWellOnly(true);
|
||||
plotTrack->setFormationBranchIndex((int)brIdx);
|
||||
|
||||
accumulatedWellFlowPlot()->addTrack(plotTrack);
|
||||
|
||||
@@ -152,6 +152,8 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
CAF_PDM_InitFieldNoDefault(&m_formationLevel, "FormationLevel", "Well Pick Filter", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_showformationFluids, "ShowFormationFluids", false, "Show Fluids", "", "", "");
|
||||
|
||||
m_formationsForCaseWithSimWellOnly = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -807,18 +809,30 @@ void RimWellLogTrack::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
|
||||
formationGroup->add(&m_showFormations);
|
||||
|
||||
if (!m_formationsForCaseWithSimWellOnly)
|
||||
{
|
||||
formationGroup->add(&m_formationSource);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_formationSource = CASE;
|
||||
}
|
||||
|
||||
if (m_formationSource() == CASE)
|
||||
{
|
||||
formationGroup->add(&m_formationCase);
|
||||
|
||||
if (!m_formationsForCaseWithSimWellOnly)
|
||||
{
|
||||
formationGroup->add(&m_formationTrajectoryType);
|
||||
|
||||
if (m_formationTrajectoryType() == WELL_PATH)
|
||||
{
|
||||
formationGroup->add(&m_formationWellPathForSourceCase);
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if (m_formationsForCaseWithSimWellOnly || m_formationTrajectoryType() == SIMULATION_WELL)
|
||||
{
|
||||
formationGroup->add(&m_formationSimWellName);
|
||||
|
||||
@@ -996,6 +1010,14 @@ void RimWellLogTrack::uiOrderingForVisibleXRange(caf::PdmUiOrdering& uiOrdering)
|
||||
gridGroup->add(&m_visibleXRangeMax);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setFormationsForCaseWithSimWellOnly(bool caseWithSimWellOnly)
|
||||
{
|
||||
m_formationsForCaseWithSimWellOnly = caseWithSimWellOnly;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -119,6 +119,8 @@ public:
|
||||
void uiOrderingForRftPltFormations(caf::PdmUiOrdering& uiOrdering);
|
||||
void uiOrderingForVisibleXRange(caf::PdmUiOrdering& uiOrdering);
|
||||
|
||||
void setFormationsForCaseWithSimWellOnly(bool caseWithSimWellOnly);
|
||||
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
@@ -178,6 +180,8 @@ private:
|
||||
|
||||
caf::PdmField<bool> m_formationBranchDetection;
|
||||
|
||||
bool m_formationsForCaseWithSimWellOnly;
|
||||
|
||||
QPointer<RiuWellLogTrack> m_wellLogTrackPlotWidget;
|
||||
|
||||
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
|
||||
|
||||
@@ -528,6 +528,24 @@ QString RimSummaryPlot::generatedPlotTitleFromVisibleCurves() const
|
||||
return generatePlotTitle(&nameHelper);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlot::copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot)
|
||||
{
|
||||
{
|
||||
QString data = sourceSummaryPlot.yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_LEFT)->writeObjectToXmlString();
|
||||
yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_LEFT)
|
||||
->readObjectFromXmlString(data, caf::PdmDefaultObjectFactory::instance());
|
||||
}
|
||||
|
||||
{
|
||||
QString data = sourceSummaryPlot.yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_RIGHT)->writeObjectToXmlString();
|
||||
yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_RIGHT)
|
||||
->readObjectFromXmlString(data, caf::PdmDefaultObjectFactory::instance());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -115,6 +115,8 @@ public:
|
||||
void updateCurveNames();
|
||||
QString generatedPlotTitleFromVisibleCurves() const;
|
||||
|
||||
void copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot);
|
||||
|
||||
// RimViewWindow overrides
|
||||
public:
|
||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
|
||||
@@ -227,7 +227,7 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
||||
return options;
|
||||
}
|
||||
|
||||
std::set<QString> identifierTexts;
|
||||
std::vector<QString> identifierTexts;
|
||||
|
||||
RifSummaryReaderInterface* reader = firstSummaryReaderForVisibleCurves();
|
||||
if (reader)
|
||||
@@ -265,7 +265,7 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
||||
quantityAnalyzer.appendAdresses(subset);
|
||||
for (const auto& quantity : quantityAnalyzer.quantities())
|
||||
{
|
||||
identifierTexts.insert(QString::fromStdString(quantity));
|
||||
identifierTexts.push_back(QString::fromStdString(quantity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user