mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5106 Fix crash when importing multiple well paths with the same name
This commit is contained in:
@@ -202,7 +202,7 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimFileWellPath*> RimWellPathCollection::addWellPaths( QStringList filePaths, QStringList* errorMessages )
|
||||
std::vector<RimWellPath*> RimWellPathCollection::addWellPaths( QStringList filePaths, QStringList* errorMessages )
|
||||
{
|
||||
CAF_ASSERT( errorMessages );
|
||||
|
||||
@@ -259,11 +259,12 @@ std::vector<RimFileWellPath*> RimWellPathCollection::addWellPaths( QStringList f
|
||||
}
|
||||
|
||||
readAndAddWellPaths( wellPathArray );
|
||||
CAF_ASSERT( wellPathArray.empty() );
|
||||
|
||||
scheduleRedrawAffectedViews();
|
||||
updateAllRequiredEditors();
|
||||
|
||||
return wellPathArray;
|
||||
return wellPaths.childObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -304,7 +305,7 @@ void RimWellPathCollection::readAndAddWellPaths( std::vector<RimFileWellPath*>&
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
wellPathArray.clear(); // This should not be used again. We may have deleted items
|
||||
this->sortWellsByName();
|
||||
}
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ public:
|
||||
|
||||
caf::PdmChildArrayField<RimWellPath*> wellPaths;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
std::vector<RimFileWellPath*> addWellPaths( QStringList filePaths, QStringList* errorMessages );
|
||||
void loadDataAndUpdate();
|
||||
std::vector<RimWellPath*> addWellPaths( QStringList filePaths, QStringList* errorMessages );
|
||||
|
||||
void removeWellPath( RimWellPath* wellPath );
|
||||
void deleteAllWellPaths();
|
||||
|
||||
Reference in New Issue
Block a user