mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Selecting a well path in 3d view can now update selected well path in well log plots
This commit is contained in:
committed by
Magne Sjaastad
parent
7607c19c7a
commit
1507894066
@@ -1151,17 +1151,39 @@ RifReaderRftInterface* RimWellLogCurveCommonDataSource::rftReader()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurveCommonDataSource::selectSimWell( QString wellName )
|
||||
void RimWellLogCurveCommonDataSource::selectWell( QString wellName )
|
||||
{
|
||||
if ( !m_allow3DSelectionLink() ) return;
|
||||
|
||||
auto* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case() );
|
||||
if ( eclipseCase )
|
||||
if ( m_trajectoryType() == RimWellLogExtractionCurve::WELL_PATH )
|
||||
{
|
||||
std::set<QString> sortedWellNames = eclipseCase->sortedSimWellNames();
|
||||
if ( std::count( sortedWellNames.begin(), sortedWellNames.end(), wellName ) > 0 )
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
RimTools::wellPathOptionItems( &options );
|
||||
|
||||
for ( auto& opt : options )
|
||||
{
|
||||
m_simWellName.setValueWithFieldChanged( wellName );
|
||||
if ( opt.optionUiText() == wellName )
|
||||
{
|
||||
QVariant oldPath = m_wellPath.toQVariant();
|
||||
RimWellPath* wellPath =
|
||||
RimProject::current()->activeOilField()->wellPathCollection->wellPathByName( wellName );
|
||||
|
||||
m_wellPath = wellPath;
|
||||
m_wellPath.uiCapability()->notifyFieldChanged( oldPath, opt.value() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( m_trajectoryType() == RimWellLogExtractionCurve::SIMULATION_WELL )
|
||||
{
|
||||
auto* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case() );
|
||||
if ( eclipseCase )
|
||||
{
|
||||
std::set<QString> sortedWellNames = eclipseCase->sortedSimWellNames();
|
||||
if ( std::count( sortedWellNames.begin(), sortedWellNames.end(), wellName ) > 0 )
|
||||
{
|
||||
m_simWellName.setValueWithFieldChanged( wellName );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user