mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve how wells are connected during import
When importing new wells, consider all wells when connecting multi segment wells Make sure that import of individual well paths will give the same ordering as importing all wells in a single operation.
This commit is contained in:
@@ -66,7 +66,6 @@ RicImportWellPaths::RicImportWellPaths()
|
||||
{
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPathFolder, "wellPathFolder", "" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPathFiles, "wellPathFiles", "" );
|
||||
CAF_PDM_InitScriptableField( &m_importGrouped, "importGrouped", false, "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -124,7 +123,7 @@ caf::PdmScriptResponse RicImportWellPaths::execute()
|
||||
caf::PdmScriptResponse response;
|
||||
if ( !wellPathFiles.empty() )
|
||||
{
|
||||
std::vector<RimWellPath*> importedWellPaths = importWellPaths( wellPathFiles, m_importGrouped(), &warningMessages );
|
||||
std::vector<RimWellPath*> importedWellPaths = importWellPaths( wellPathFiles, &warningMessages );
|
||||
if ( !importedWellPaths.empty() )
|
||||
{
|
||||
RicImportWellPathsResult* wellPathsResult = new RicImportWellPathsResult;
|
||||
@@ -157,15 +156,14 @@ caf::PdmScriptResponse RicImportWellPaths::execute()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*>
|
||||
RicImportWellPaths::importWellPaths( const QStringList& wellPathFilePaths, bool importGrouped, QStringList* errorMessages )
|
||||
std::vector<RimWellPath*> RicImportWellPaths::importWellPaths( const QStringList& wellPathFilePaths, QStringList* errorMessages )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
// Remember the path to next time
|
||||
app->setLastUsedDialogDirectory( "WELLPATH_DIR", QFileInfo( wellPathFilePaths.last() ).absolutePath() );
|
||||
|
||||
std::vector<RimWellPath*> wellPaths = app->addWellPathsToModel( wellPathFilePaths, importGrouped, errorMessages );
|
||||
std::vector<RimWellPath*> wellPaths = app->addWellPathsToModel( wellPathFilePaths, errorMessages );
|
||||
|
||||
RimProject* project = app->project();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user