From 10ad053c30da73c00a288bd84753aaff61d369dd Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 3 Jun 2024 19:42:08 +0200 Subject: [PATCH] Osdu Well Log: make it possible to add Osdu well logs to plot. --- .../Commands/RicImportWellLogOsduFeature.cpp | 34 ++++++---- .../Commands/RicWellLogTools.cpp | 2 +- .../RicAddWellLogToPlotFeature.cpp | 24 +++---- .../RicNewWellLogFileCurveFeature.cpp | 2 +- .../Flow/RimWellPlotTools.cpp | 11 ++-- .../ProjectDataModel/Flow/RimWellRftPlot.cpp | 2 +- .../WellLog/RimEnsembleWellLogCurveSet.cpp | 5 +- .../WellLog/RimOsduWellLog.cpp | 9 ++- .../ProjectDataModel/WellLog/RimOsduWellLog.h | 1 + .../RimWellLogCurveCommonDataSource.cpp | 3 +- .../WellLog/RimWellLogLasFileCurve.cpp | 66 ++++++++++--------- .../WellLog/RimWellLogLasFileCurve.h | 13 ++-- .../WellPath/RimOsduWellPath.cpp | 6 ++ .../ProjectDataModel/WellPath/RimWellPath.cpp | 4 +- 14 files changed, 104 insertions(+), 78 deletions(-) diff --git a/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp b/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp index 8f9f283cc5..827c7a47ee 100644 --- a/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportWellLogOsduFeature.cpp @@ -72,24 +72,30 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked ) if ( !oilField->wellPathCollection ) oilField->wellPathCollection = std::make_unique(); - RimOsduWellLog* osduWellLog = new RimOsduWellLog; // TODO: get from OSDU... - osduWellLog->setWellLogId( "npequinor-dev:work-product-component--WellLog:aeb5bd8b1de14138afe9f23cacbc7fe7" ); - oilField->wellPathCollection->addWellLog( osduWellLog, wellPath ); + std::vector wellLogIds = { "npequinor-dev:work-product-component--WellLog:aeb5bd8b1de14138afe9f23cacbc7fe7" }; - auto osduConnector = makeOsduConnector( app ); - - auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector.get(), osduWellLog->wellLogId() ); - if ( wellLogData.notNull() ) + for ( QString wellLogId : wellLogIds ) { - osduWellLog->setWellLogData( wellLogData.p() ); - } - else - { - RiaLogging::error( "Importing OSDU well log failed: " + errorMessage ); - } + RimOsduWellLog* osduWellLog = new RimOsduWellLog; + osduWellLog->setName( wellLogId ); + osduWellLog->setWellLogId( wellLogId ); + oilField->wellPathCollection->addWellLog( osduWellLog, wellPath ); - osduWellLog->updateConnectedEditors(); + auto osduConnector = makeOsduConnector( app ); + + auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector.get(), osduWellLog->wellLogId() ); + if ( wellLogData.notNull() ) + { + osduWellLog->setWellLogData( wellLogData.p() ); + } + else + { + RiaLogging::error( "Importing OSDU well log failed: " + errorMessage ); + } + + osduWellLog->updateConnectedEditors(); + } } } diff --git a/ApplicationLibCode/Commands/RicWellLogTools.cpp b/ApplicationLibCode/Commands/RicWellLogTools.cpp index 055d3b54d8..28585e0611 100644 --- a/ApplicationLibCode/Commands/RicWellLogTools.cpp +++ b/ApplicationLibCode/Commands/RicWellLogTools.cpp @@ -147,7 +147,7 @@ void RicWellLogTools::addWellLogChannelsToPlotTrack( RimWellLogTrack* plotTrack, if ( wellPath ) { - if ( wellLogFile ) plotCurve->setWellLogFile( wellLogFile ); + if ( wellLogFile ) plotCurve->setWellLog( wellLogFile ); plotCurve->setWellPath( wellPath ); plotCurve->setWellLogChannelName( wellLogChannel->name() ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp index 58715e86de..67efb6ec3c 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp @@ -69,13 +69,12 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked ) plot->loadDataAndUpdate(); - for ( size_t wlIdx = 0; wlIdx < selection.size(); wlIdx++ ) + bool isFirst = true; + for ( RimWellLogChannel* wellLogChannel : selection ) { - RimWellLogChannel* wellLog = selection[wlIdx]; - - auto wellPath = wellLog->firstAncestorOrThisOfType(); - auto wellLogFile = wellLog->firstAncestorOrThisOfType(); - if ( wellLogFile ) + auto wellPath = wellLogChannel->firstAncestorOrThisOfType(); + auto wellLog = wellLogChannel->firstAncestorOrThisOfType(); + if ( wellLog ) { RimWellLogLasFileCurve* curve = new RimWellLogLasFileCurve; cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plotTrack->curveCount() ); @@ -83,18 +82,19 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked ) plotTrack->addCurve( curve ); - RigWellLogLasFile* wellLogDataFile = wellLogFile->wellLogData(); - CVF_ASSERT( wellLogDataFile ); + RigWellLogData* wellLogData = wellLog->wellLogData(); + CVF_ASSERT( wellLogData ); - if ( wlIdx == 0 ) + if ( isFirst ) { // Initialize plot with depth unit from the first log file - plot->setDepthUnit( wellLogDataFile->depthUnit() ); + plot->setDepthUnit( wellLogData->depthUnit() ); + isFirst = false; } curve->setWellPath( wellPath ); - curve->setWellLogChannelName( wellLog->name() ); - curve->setWellLogFile( wellLogFile ); + curve->setWellLogChannelName( wellLogChannel->name() ); + curve->setWellLog( wellLog ); curve->loadDataAndUpdate( true ); } diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp index f702eb9fe5..cb542a5811 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp @@ -72,7 +72,7 @@ void RicNewWellLogFileCurveFeature::onActionTriggered( bool isChecked ) if ( wellPath->wellLogFiles().size() == 1 ) { - plotCurve->setWellLogFile( wellPath->wellLogFiles().front() ); + plotCurve->setWellLog( wellPath->wellLogFiles().front() ); } plotCurve->updateConnectedEditors(); } diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp index f8aaf2e540..992c75894c 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPlotTools.cpp @@ -676,17 +676,16 @@ RiaRftPltCurveDefinition RimWellPlotTools::curveDefFromCurve( const RimWellLogCu } else if ( wellLogFileCurve != nullptr ) { - RimWellLogFile* const wellLogFile = wellLogFileCurve->wellLogFile(); + RimWellLog* const wellLog = wellLogFileCurve->wellLog(); - if ( wellLogFile != nullptr ) + if ( wellLog != nullptr ) { - const QDateTime date = wellLogFile->date(); - + const QDateTime date = wellLog->date(); if ( date.isValid() ) { - if ( auto wellLogLasFile = dynamic_cast( wellLogFile ) ) + if ( auto wellLogLasFile = dynamic_cast( wellLog ) ) { - return RiaRftPltCurveDefinition( RifDataSourceForRftPlt( wellLogLasFile ), wellLogFile->wellName(), date ); + return RiaRftPltCurveDefinition( RifDataSourceForRftPlt( wellLogLasFile ), wellLog->wellName(), date ); } } } diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp index 7631f6c744..7dd9d4d7b1 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp @@ -692,7 +692,7 @@ void RimWellRftPlot::updateCurvesInPlot( const std::setaddCurve( curve ); curve->setWellPath( wellPath ); - curve->setWellLogFile( wellLogFile ); + curve->setWellLog( wellLogFile ); curve->setWellLogChannelName( pressureChannel->name() ); curve->setZOrder( 2 ); diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp index 75bbffd6b2..ece94e43ab 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimEnsembleWellLogCurveSet.cpp @@ -645,7 +645,8 @@ RimSummaryCase* RimEnsembleWellLogCurveSet::findMatchingSummaryCase( RimWellLogL std::vector sumCases = summaryCaseCollection->allSummaryCases(); for ( auto sumCase : sumCases ) { - if ( isSameRealization( sumCase, wellLogCurve->wellLogFile() ) ) + RimWellLogFile* wellLogFile = dynamic_cast( wellLogCurve->wellLog() ); + if ( wellLogFile && isSameRealization( sumCase, wellLogFile ) ) { return sumCase; } @@ -794,7 +795,7 @@ void RimEnsembleWellLogCurveSet::updateEnsembleCurves( const std::vectorsetWellPath( wellPath ); curve->setWellLogChannelName( wellLogChannelName ); - curve->setWellLogFile( wellLogFile ); + curve->setWellLog( wellLogFile ); curve->setSymbol( m_curveAppearance->symbol() ); curve->setSymbolSize( m_curveAppearance->symbolSize() ); diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.cpp index 82e911cbb0..6aa942cfae 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.cpp @@ -48,7 +48,6 @@ RimOsduWellLog::RimOsduWellLog() CAF_PDM_InitFieldNoDefault( &m_name, "Name", "" ); m_name.uiCapability()->setUiReadOnly( true ); - RiaFieldHandleTools::disableWriteAndSetFieldHidden( &m_name ); m_date.uiCapability()->setUiReadOnly( true ); @@ -126,6 +125,14 @@ caf::PdmFieldHandle* RimOsduWellLog::userDescriptionField() return &m_name; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimOsduWellLog::setName( const QString& name ) +{ + m_name = name; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.h b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.h index fcba219e5e..1051acf40a 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.h +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimOsduWellLog.h @@ -46,6 +46,7 @@ public: RimOsduWellLog(); ~RimOsduWellLog() override; + void setName( const QString& name ); QString name() const override; QString wellName() const override; diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogCurveCommonDataSource.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogCurveCommonDataSource.cpp index 8cfc90978c..84d557d059 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogCurveCommonDataSource.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogCurveCommonDataSource.cpp @@ -34,6 +34,7 @@ #include "RimTools.h" #include "RimWellFlowRateCurve.h" #include "RimWellLogExtractionCurve.h" +#include "RimWellLogFile.h" #include "RimWellLogLasFileCurve.h" #include "RimWellLogPlot.h" #include "RimWellLogPlotCollection.h" @@ -528,7 +529,7 @@ void RimWellLogCurveCommonDataSource::applyDataSourceChanges( const std::vector< if ( !fileCurve->wellLogChannelUiName().isEmpty() ) { RimWellLogFile* logFile = wellPathToApply()->firstWellLogFileMatchingChannelName( fileCurve->wellLogChannelUiName() ); - fileCurve->setWellLogFile( logFile ); + fileCurve->setWellLog( logFile ); auto parentPlot = fileCurve->firstAncestorOrThisOfTypeAsserted(); plots.insert( parentPlot ); } diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.cpp index 4723c8d768..6e1b0bc621 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.cpp @@ -60,7 +60,7 @@ RimWellLogLasFileCurve::RimWellLogLasFileCurve() CAF_PDM_InitFieldNoDefault( &m_wellLogChannelName, "CurveWellLogChannel", "Well Log Channel" ); - CAF_PDM_InitFieldNoDefault( &m_wellLogFile, "WellLogFile", "Well Log File" ); + CAF_PDM_InitFieldNoDefault( &m_wellLog, "WellLogFile", "Well Log File" ); m_wellPath = nullptr; } @@ -83,9 +83,9 @@ void RimWellLogLasFileCurve::onLoadDataAndUpdate( bool updateParentPlot ) { auto wellLogPlot = firstAncestorOrThisOfTypeAsserted(); - if ( m_wellPath && m_wellLogFile ) + if ( m_wellPath && m_wellLog ) { - RigWellLogData* wellLogFile = m_wellLogFile->wellLogData(); + RigWellLogData* wellLogFile = m_wellLog->wellLogData(); if ( wellLogFile ) { std::vector values = wellLogFile->values( m_wellLogChannelName ); @@ -287,9 +287,9 @@ void RimWellLogLasFileCurve::setWellLogChannelName( const QString& name ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimWellLogLasFileCurve::setWellLogFile( RimWellLogFile* wellLogFile ) +void RimWellLogLasFileCurve::setWellLog( RimWellLog* wellLogFile ) { - m_wellLogFile = wellLogFile; + m_wellLog = wellLogFile; } //-------------------------------------------------------------------------------------------------- @@ -315,7 +315,7 @@ void RimWellLogLasFileCurve::fieldChangedByUi( const caf::PdmFieldHandle* change { loadDataAndUpdate( true ); } - else if ( changedField == &m_wellLogFile ) + else if ( changedField == &m_wellLog ) { loadDataAndUpdate( true ); } @@ -331,7 +331,7 @@ void RimWellLogLasFileCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiO caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup( "Curve Data" ); curveDataGroup->add( &m_wellPath ); - curveDataGroup->add( &m_wellLogFile ); + curveDataGroup->add( &m_wellLog ); curveDataGroup->add( &m_wellLogChannelName ); RimStackablePlotCurve::defaultUiOrdering( uiOrdering ); @@ -362,8 +362,8 @@ QList RimWellLogLasFileCurve::calculateValueOptions( con { for ( auto wellPath : wellPathColl->allWellPaths() ) { - // Only include well paths coming from a well log file - if ( !wellPath->wellLogFiles().empty() ) + // Only include well paths coming with a well log + if ( !wellPath->wellLogs().empty() ) { options.push_back( caf::PdmOptionItemInfo( wellPath->name(), wellPath ) ); } @@ -378,17 +378,12 @@ QList RimWellLogLasFileCurve::calculateValueOptions( con if ( fieldNeedingOptions == &m_wellLogChannelName ) { - if ( m_wellPath() ) + if ( m_wellPath() && m_wellLog() ) { - if ( m_wellLogFile ) + for ( RimWellLogChannel* wellLogChannel : m_wellLog->wellLogChannels() ) { - std::vector fileLogs = m_wellLogFile->wellLogChannels(); - - for ( size_t i = 0; i < fileLogs.size(); i++ ) - { - QString wellLogChannelName = fileLogs[i]->name(); - options.push_back( caf::PdmOptionItemInfo( wellLogChannelName, wellLogChannelName ) ); - } + QString wellLogChannelName = wellLogChannel->name(); + options.push_back( caf::PdmOptionItemInfo( wellLogChannelName, wellLogChannelName ) ); } } @@ -398,14 +393,21 @@ QList RimWellLogLasFileCurve::calculateValueOptions( con } } - if ( fieldNeedingOptions == &m_wellLogFile ) + if ( fieldNeedingOptions == &m_wellLog ) { - if ( m_wellPath() && !m_wellPath->wellLogFiles().empty() ) + if ( m_wellPath() && !m_wellPath->wellLogs().empty() ) { - for ( RimWellLogFile* const wellLogFile : m_wellPath->wellLogFiles() ) + for ( RimWellLog* const wellLog : m_wellPath->wellLogs() ) { - QFileInfo fileInfo( wellLogFile->fileName() ); - options.push_back( caf::PdmOptionItemInfo( fileInfo.baseName(), wellLogFile ) ); + if ( RimWellLogFile* wellLogFile = dynamic_cast( wellLog ) ) + { + QFileInfo fileInfo( wellLogFile->fileName() ); + options.push_back( caf::PdmOptionItemInfo( fileInfo.baseName(), wellLog ) ); + } + else + { + options.push_back( caf::PdmOptionItemInfo( wellLog->name(), wellLog ) ); + } } } } @@ -424,7 +426,7 @@ void RimWellLogLasFileCurve::initAfterRead() if ( m_wellPath->wellLogFiles().size() == 1 ) { - m_wellLogFile = dynamic_cast( m_wellPath->wellLogFiles().front() ); + m_wellLog = dynamic_cast( m_wellPath->wellLogFiles().front() ); } } @@ -457,14 +459,14 @@ QString RimWellLogLasFileCurve::createCurveAutoName() channelNameAvailable = true; } - RigWellLogData* wellLogFile = m_wellLogFile ? m_wellLogFile->wellLogData() : nullptr; + RigWellLogData* wellLogData = m_wellLog ? m_wellLog->wellLogData() : nullptr; - if ( wellLogFile ) + if ( wellLogData ) { if ( channelNameAvailable ) { auto wellLogPlot = firstAncestorOrThisOfTypeAsserted(); - QString unitName = wellLogFile->convertedWellLogChannelUnitString( m_wellLogChannelName, wellLogPlot->depthUnit() ); + QString unitName = wellLogData->convertedWellLogChannelUnitString( m_wellLogChannelName, wellLogPlot->depthUnit() ); if ( !unitName.isEmpty() ) { @@ -472,7 +474,7 @@ QString RimWellLogLasFileCurve::createCurveAutoName() } } - QString date = m_wellLogFile->date().toString( RiaQDateTimeTools::dateFormatString() ); + QString date = m_wellLog->date().toString( RiaQDateTimeTools::dateFormatString() ); if ( !date.isEmpty() ) { name.push_back( date ); @@ -498,9 +500,9 @@ QString RimWellLogLasFileCurve::wellLogChannelUiName() const //-------------------------------------------------------------------------------------------------- QString RimWellLogLasFileCurve::wellLogChannelUnits() const { - if ( m_wellLogFile && m_wellLogFile->wellLogData() ) + if ( m_wellLog && m_wellLog->wellLogData() ) { - return m_wellLogFile->wellLogData()->wellLogChannelUnitString( m_wellLogChannelName ); + return m_wellLog->wellLogData()->wellLogChannelUnitString( m_wellLogChannelName ); } return RiaWellLogUnitTools::noUnitString(); } @@ -508,9 +510,9 @@ QString RimWellLogLasFileCurve::wellLogChannelUnits() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimWellLogFile* RimWellLogLasFileCurve::wellLogFile() const +RimWellLog* RimWellLogLasFileCurve::wellLog() const { - return m_wellLogFile(); + return m_wellLog(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.h b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.h index a1ab607ef2..aefa289f2b 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.h +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogLasFileCurve.h @@ -30,6 +30,7 @@ class RimWellPath; class RimWellLogChannel; class RimWellLogFile; class RigWellLogIndexDepthOffset; +class RimWellLog; //================================================================================================== /// @@ -46,7 +47,7 @@ public: void setWellPath( RimWellPath* wellPath ); RimWellPath* wellPath() const; void setWellLogChannelName( const QString& name ); - void setWellLogFile( RimWellLogFile* wellLogFile ); + void setWellLog( RimWellLog* wellLog ); void setIndexDepthOffsets( std::shared_ptr depthOffsets ); // Overrides from RimWellLogPlotCurve @@ -54,7 +55,7 @@ public: QString wellLogChannelUiName() const override; QString wellLogChannelUnits() const override; - RimWellLogFile* wellLogFile() const; + RimWellLog* wellLog() const; protected: // Overrides from RimWellLogPlotCurve @@ -75,10 +76,10 @@ protected: const std::vector& kIndexValues ) const; protected: - caf::PdmPtrField m_wellPath; - caf::PdmPtrField m_wellLogFile; - caf::PdmField m_wellLogChannelName; - caf::PdmField m_wellLogChannnelUnit; + caf::PdmPtrField m_wellPath; + caf::PdmPtrField m_wellLog; + caf::PdmField m_wellLogChannelName; + caf::PdmField m_wellLogChannnelUnit; std::shared_ptr m_indexDepthOffsets; }; diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimOsduWellPath.cpp b/ApplicationLibCode/ProjectDataModel/WellPath/RimOsduWellPath.cpp index 7529828939..1f5e6bf415 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimOsduWellPath.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimOsduWellPath.cpp @@ -22,6 +22,12 @@ RimOsduWellPath::RimOsduWellPath() CAF_PDM_InitFieldNoDefault( &m_fileId, "FileId", "File Id" ); m_fileId.uiCapability()->setUiReadOnly( true ); + + // Required, as these settings are set in RimWellPath() + m_name.uiCapability()->setUiReadOnly( false ); + m_name.uiCapability()->setUiHidden( false ); + m_name.xmlCapability()->setIOReadable( true ); + m_name.xmlCapability()->setIOWritable( true ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPath.cpp b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPath.cpp index 7209487437..4cb1edb3c4 100644 --- a/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPath.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellPath/RimWellPath.cpp @@ -25,6 +25,7 @@ #include "RiaSimWellBranchTools.h" #include "RiaWellNameComparer.h" +#include "RicImportWellLogOsduFeature.h" #include "RicfCommandObject.h" #include "RifWellPathFormationsImporter.h" @@ -38,6 +39,7 @@ #include "RimFishbonesCollection.h" #include "RimMainPlotCollection.h" #include "RimMswCompletionParameters.h" +#include "RimOsduWellLog.h" #include "RimPerforationCollection.h" #include "RimProject.h" #include "RimStimPlanModelCollection.h" @@ -934,7 +936,7 @@ void RimWellPath::addWellLog( RimWellLog* wellLog ) } } } - else + else if ( RimOsduWellLog* osduWellLog = dynamic_cast( wellLog ) ) { m_wellLogs.push_back( osduWellLog ); }