mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Link selection in 3D view with plots (#9195)
* Allow well selections in 3D view to update well selection in summary plots and well log plots
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafPdmUiCheckBoxEditor.h"
|
||||
#include "cafPdmUiCheckBoxTristateEditor.h"
|
||||
#include "cafPdmUiComboBoxEditor.h"
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
@@ -89,6 +90,9 @@ RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
|
||||
"",
|
||||
"Compute branches based on how simulation well cells are organized",
|
||||
"" );
|
||||
CAF_PDM_InitField( &m_allow3DSelectionLink, "Allow3DSelectionLink", true, "Allow Well Selection from 3D View" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_allow3DSelectionLink );
|
||||
|
||||
m_branchDetection.v() = caf::Tristate::State::PartiallyTrue;
|
||||
m_branchDetection.uiCapability()->setUiEditorTypeName( caf::PdmUiCheckBoxTristateEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitField( &m_branchIndex, "Branch", -1, "Branch Index" );
|
||||
@@ -1011,6 +1015,8 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
|
||||
else if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::SIMULATION_WELL )
|
||||
{
|
||||
group->add( &m_simWellName );
|
||||
group->add( &m_allow3DSelectionLink );
|
||||
|
||||
if ( RiaSimWellBranchTools::simulationWellBranches( m_simWellName(), true ).size() > 1 )
|
||||
{
|
||||
group->add( &m_branchDetection );
|
||||
@@ -1124,3 +1130,21 @@ RifReaderRftInterface* RimWellLogCurveCommonDataSource::rftReader()
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurveCommonDataSource::selectSimWell( QString wellName )
|
||||
{
|
||||
if ( !m_allow3DSelectionLink() ) return;
|
||||
|
||||
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