Go via RimWellPathCollection::addWellPath for any well path addition

This commit is contained in:
Gaute Lindkvist 2020-10-06 15:05:04 +02:00
parent 6622328622
commit 8e8534d61e
2 changed files with 18 additions and 9 deletions

View File

@ -260,6 +260,15 @@ std::vector<RimWellPath*> RimWellPathCollection::addWellPaths( QStringList fileP
return wellPaths();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::addWellPath( RimWellPath* wellPath )
{
m_wellPaths.push_back( wellPath );
m_mostRecentlyUpdatedWellPath = wellPath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -300,8 +309,7 @@ void RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>&
{
wellPath->setWellPathColor( RiaColorTables::wellPathsPaletteColors().cycledColor3f( m_wellPaths.size() ) );
wellPath->setUnitSystem( findUnitSystemForWellPath( wellPath ) );
m_mostRecentlyUpdatedWellPath = wellPath;
m_wellPaths.push_back( wellPath );
addWellPath( wellPath );
}
progress.incrementProgress();
@ -317,7 +325,7 @@ void RimWellPathCollection::addWellPaths( const std::vector<RimWellPath*> incomi
{
for ( const auto& wellPath : incomingWellPaths )
{
m_wellPaths.push_back( wellPath );
addWellPath( wellPath );
}
this->sortWellsByName();
@ -347,7 +355,7 @@ std::vector<RimWellLogFile*> RimWellPathCollection::addWellLogs( const QStringLi
if ( !wellPath )
{
wellPath = new RimWellPath();
m_wellPaths.push_back( wellPath );
addWellPath( wellPath );
}
wellPath->addWellLogFile( logFileInfo );
@ -386,7 +394,7 @@ void RimWellPathCollection::addWellPathFormations( const QStringList& filePaths
{
wellPath = new RimWellPath();
wellPath->setName( it->first );
m_wellPaths.push_back( wellPath );
addWellPath( wellPath );
RiaLogging::info( QString( "Created new well: %1" ).arg( wellPath->name() ) );
}
wellPath->setFormationsGeometry( it->second );

View File

@ -91,7 +91,6 @@ public:
void loadDataAndUpdate();
std::vector<RimWellPath*> addWellPaths( QStringList filePaths, QStringList* errorMessages );
std::vector<RimWellPath*> wellPaths();
void removeWellPath( RimWellPath* wellPath );
void deleteAllWellPaths();
@ -101,9 +100,11 @@ public:
void readWellPathFormationFiles();
void reloadAllWellPathFormations();
RimWellPath* wellPathByName( const QString& wellPathName ) const;
RimWellPath* tryFindMatchingWellPath( const QString& wellName ) const;
void addWellPaths( const std::vector<RimWellPath*> incomingWellPaths );
RimWellPath* wellPathByName( const QString& wellPathName ) const;
RimWellPath* tryFindMatchingWellPath( const QString& wellName ) const;
void addWellPaths( const std::vector<RimWellPath*> incomingWellPaths );
void addWellPath( RimWellPath* wellPath );
std::vector<RimWellLogFile*> addWellLogs( const QStringList& filePaths, QStringList* errorMessages );
void addWellPathFormations( const QStringList& filePaths );