mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2282 RFT plot. Fix strange behavior
This commit is contained in:
parent
ea362ad154
commit
6beb217882
@ -264,7 +264,7 @@ void RimWellPlotTools::addTimeStepsToMap(std::map<QDateTime, std::set<RifDataSou
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure(const QString& simWellName)
|
||||
std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure(const QString& wellPathNameOrSimWellName)
|
||||
{
|
||||
std::vector<RimWellLogFile*> wellLogFiles;
|
||||
const RimProject* const project = RiaApplication::instance()->project();
|
||||
@ -272,7 +272,9 @@ std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure(co
|
||||
|
||||
for (auto wellPath : wellPaths)
|
||||
{
|
||||
if (simWellName == wellPath->associatedSimulationWellName())
|
||||
if (!wellPathNameOrSimWellName.isEmpty() &&
|
||||
(wellPathNameOrSimWellName == wellPath->associatedSimulationWellName() ||
|
||||
wellPathNameOrSimWellName == wellPath->name()))
|
||||
{
|
||||
const std::vector<RimWellLogFile*> files = wellPath->wellLogFiles();
|
||||
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
static std::pair<size_t, QString> pressureResultDataInfo(const RigEclipseCaseData* eclipseCaseData);
|
||||
static void addTimeStepsToMap(std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& destMap,
|
||||
const std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& timeStepsToAdd);
|
||||
static std::vector<RimWellLogFile*> wellLogFilesContainingPressure(const QString& simWellName);
|
||||
static std::vector<RimWellLogFile*> wellLogFilesContainingPressure(const QString& wellPathNameOrSimWellName);
|
||||
static RimWellLogFileChannel* getPressureChannelFromWellFile(const RimWellLogFile* wellLogFile);
|
||||
static RimWellPath* wellPathFromWellLogFile(const RimWellLogFile* wellLogFile);
|
||||
static std::set<QDateTime> timeStepsFromRftCase(RimEclipseResultCase* rftCase, const QString& simWellName);
|
||||
|
@ -295,7 +295,7 @@ void RimWellRftPlot::applyInitialSelections()
|
||||
RimWellPlotTools::appendSet(gridTimeSteps, RimWellPlotTools::timeStepsFromGridCase(gridCase));
|
||||
}
|
||||
|
||||
std::vector<RimWellLogFile*> wellLogFiles = RimWellPlotTools::wellLogFilesContainingPressure(simWellName);
|
||||
std::vector<RimWellLogFile*> wellLogFiles = RimWellPlotTools::wellLogFilesContainingPressure(m_wellPathNameOrSimWellName);
|
||||
if(wellLogFiles.size() > 0)
|
||||
{
|
||||
sourcesToSelect.push_back(RifDataSourceForRftPlt(RifDataSourceForRftPlt::OBSERVED));
|
||||
@ -541,7 +541,7 @@ std::vector<RifDataSourceForRftPlt> RimWellRftPlot::selectedSourcesExpanded() co
|
||||
{
|
||||
if (addr.sourceType() == RifDataSourceForRftPlt::OBSERVED)
|
||||
{
|
||||
for (RimWellLogFile* const wellLogFile : RimWellPlotTools::wellLogFilesContainingPressure(associatedSimWellName()))
|
||||
for (RimWellLogFile* const wellLogFile : RimWellPlotTools::wellLogFilesContainingPressure(m_wellPathNameOrSimWellName))
|
||||
{
|
||||
sources.push_back(RifDataSourceForRftPlt(RifDataSourceForRftPlt::OBSERVED, wellLogFile));
|
||||
}
|
||||
@ -582,6 +582,10 @@ RimWellLogPlot* RimWellRftPlot::wellLogPlot() const
|
||||
void RimWellRftPlot::setSimWellOrWellPathName(const QString& currWellName)
|
||||
{
|
||||
m_wellPathNameOrSimWellName = currWellName;
|
||||
if (m_wellPathNameOrSimWellName().isEmpty())
|
||||
{
|
||||
m_wellPathNameOrSimWellName = "None";
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -649,7 +653,7 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
|
||||
options.push_back(item);
|
||||
}
|
||||
|
||||
if (RimWellPlotTools::wellLogFilesContainingPressure(simWellName).size() > 0)
|
||||
if (RimWellPlotTools::wellLogFilesContainingPressure(m_wellPathNameOrSimWellName).size() > 0)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo::createHeader(RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
|
||||
|
||||
@ -799,6 +803,8 @@ void RimWellRftPlot::calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>
|
||||
{
|
||||
RimProject * proj = RiaApplication::instance()->project();
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo("None", "None"));
|
||||
|
||||
if (proj != nullptr)
|
||||
{
|
||||
const std::vector<QString> simWellNames = proj->simulationWellNames();
|
||||
@ -830,8 +836,6 @@ void RimWellRftPlot::calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>
|
||||
options.push_back(caf::PdmOptionItemInfo(wellName.first, wellName.second));
|
||||
}
|
||||
}
|
||||
|
||||
options.push_back(caf::PdmOptionItemInfo("None", "None"));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user