mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-28 16:10:24 -05:00
#12848 Python: fix unexpected returned well path when importing.
Fixes #12848.
This commit is contained in:
1 parent
393917e6f3
commit
a2473af644
3 files changed
+36
-5
No files matched your search
@@ -298,13 +298,13 @@ std::vector<RimWellPath*> RimWellPathCollection::addWellPaths( QStringList fileP
|
||||
}
|
||||
}
|
||||
|
||||
readAndAddWellPaths( wellPathArray );
|
||||
std::vector<RimWellPath*> addedWellPaths = readAndAddWellPaths( wellPathArray );
|
||||
CAF_ASSERT( wellPathArray.empty() );
|
||||
|
||||
scheduleRedrawAffectedViews();
|
||||
updateAllRequiredEditors();
|
||||
|
||||
return allWellPaths();
|
||||
return addedWellPaths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -330,10 +330,12 @@ std::vector<RimWellPath*> RimWellPathCollection::allWellPaths() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>& wellPathArray )
|
||||
std::vector<RimWellPath*> RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>& wellPathArray )
|
||||
{
|
||||
caf::ProgressInfo progress( wellPathArray.size(), "Reading well paths from file" );
|
||||
|
||||
// Keep track of the well paths that were actually added.
|
||||
std::vector<RimWellPath*> addedWellPaths;
|
||||
for ( RimFileWellPath* wellPath : wellPathArray )
|
||||
{
|
||||
wellPath->readWellPathFile( nullptr, m_wellPathImporter.get(), true );
|
||||
@@ -362,6 +364,7 @@ void RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>&
|
||||
wellPath->setWellPathColor( RiaColorTables::wellPathsPaletteColors().cycledColor3f( m_wellPaths.size() ) );
|
||||
wellPath->setUnitSystem( findUnitSystemForWellPath( wellPath ) );
|
||||
addWellPath( wellPath );
|
||||
addedWellPaths.push_back( wellPath );
|
||||
}
|
||||
|
||||
progress.incrementProgress();
|
||||
@@ -371,6 +374,8 @@ void RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>&
|
||||
groupWellPaths( allWellPaths() );
|
||||
sortWellsByName();
|
||||
rebuildWellPathNodes();
|
||||
|
||||
return addedWellPaths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -150,8 +150,8 @@ private:
|
||||
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void readAndAddWellPaths( std::vector<RimFileWellPath*>& wellPathArray );
|
||||
void sortWellsByName();
|
||||
std::vector<RimWellPath*> readAndAddWellPaths( std::vector<RimFileWellPath*>& wellPathArray );
|
||||
void sortWellsByName();
|
||||
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> findUnitSystemForWellPath( const RimWellPath* wellPath );
|
||||
|
||||
|
||||
Reference in new issue
Block a user