mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4728 from OPM/feature-ensemble-rft-md-labels
Feature ensemble rft md labels
This commit is contained in:
@@ -222,6 +222,12 @@ QString RimWellRftPlot::associatedSimWellName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellRftPlot::applyInitialSelections()
|
||||
{
|
||||
std::map<QString, QStringList> wellSources = findWellSources();
|
||||
if ( m_wellPathNameOrSimWellName == "None" && !wellSources.empty() )
|
||||
{
|
||||
m_wellPathNameOrSimWellName = wellSources.begin()->first;
|
||||
}
|
||||
|
||||
std::vector<RifDataSourceForRftPlt> sourcesToSelect;
|
||||
const QString simWellName = associatedSimWellName();
|
||||
|
||||
@@ -639,7 +645,20 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions( const caf::
|
||||
|
||||
if ( fieldNeedingOptions == &m_wellPathNameOrSimWellName )
|
||||
{
|
||||
calculateValueOptionsForWells( options );
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", "None" ) );
|
||||
|
||||
std::map<QString, QStringList> wellSources = findWellSources();
|
||||
for ( const auto& wellName : wellSources )
|
||||
{
|
||||
const QStringList& tags = wellName.second;
|
||||
QString uiText = wellName.first;
|
||||
if ( !tags.empty() )
|
||||
{
|
||||
uiText += QString( " (%1)" ).arg( wellName.second.join( ", " ) );
|
||||
}
|
||||
|
||||
options.push_back( caf::PdmOptionItemInfo( uiText, wellName.first ) );
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_selectedSources )
|
||||
{
|
||||
@@ -849,17 +868,16 @@ void RimWellRftPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellRftPlot::calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options )
|
||||
std::map<QString, QStringList> RimWellRftPlot::findWellSources()
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::map<QString /*value*/, QStringList /*uitext*/> wellNames;
|
||||
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", "None" ) );
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
if ( proj != nullptr )
|
||||
{
|
||||
const std::vector<QString> simWellNames = proj->simulationWellNames();
|
||||
std::set<QString> simWellsAssociatedWithWellPath;
|
||||
std::map<QString /*value*/, QStringList /*uitext*/> wellNames;
|
||||
const std::vector<QString> simWellNames = proj->simulationWellNames();
|
||||
std::set<QString> simWellsAssociatedWithWellPath;
|
||||
|
||||
// Observed wells
|
||||
for ( RimWellPath* const wellPath : proj->allWellPaths() )
|
||||
@@ -905,19 +923,8 @@ void RimWellRftPlot::calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( const auto& wellName : wellNames )
|
||||
{
|
||||
const QStringList& tags = wellName.second;
|
||||
QString uiText = wellName.first;
|
||||
if ( !tags.empty() )
|
||||
{
|
||||
uiText += QString( " (%1)" ).arg( wellName.second.join( ", " ) );
|
||||
}
|
||||
|
||||
options.push_back( caf::PdmOptionItemInfo( uiText, wellName.first ) );
|
||||
}
|
||||
}
|
||||
return wellNames;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user