mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
Close project if cancelling well path loading.
This commit is contained in:
parent
9bea739252
commit
b324fdb26b
@ -548,7 +548,15 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
}
|
||||
|
||||
// Initialize well paths
|
||||
oilField->wellPathCollection->loadDataAndUpdate();
|
||||
if ( !oilField->wellPathCollection->loadDataAndUpdate() )
|
||||
{
|
||||
// Opening well path was cancelled or failed: close project.
|
||||
closeProject();
|
||||
m_project = std::make_unique<RimProject>();
|
||||
onProjectOpened();
|
||||
return true;
|
||||
}
|
||||
|
||||
oilField->ensembleWellLogsCollection->loadDataAndUpdate();
|
||||
oilField->vfpDataCollection->loadDataAndUpdate();
|
||||
|
||||
|
@ -149,7 +149,7 @@ void RimWellPathCollection::fieldChangedByUi( const caf::PdmFieldHandle* changed
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read files containing well path data, or create geometry based on the targets
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::loadDataAndUpdate()
|
||||
bool RimWellPathCollection::loadDataAndUpdate()
|
||||
{
|
||||
auto hasOsduData = []( const std::vector<RimWellPath*>& wellPaths ) -> bool
|
||||
{
|
||||
@ -200,7 +200,7 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
|
||||
if ( progress.isCancelled() )
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
progress.setProgressDescription( QString( "Reading well logs." ) );
|
||||
@ -230,6 +230,8 @@ void RimWellPathCollection::loadDataAndUpdate()
|
||||
rebuildWellPathNodes();
|
||||
|
||||
sortWellsByName();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
caf::PdmField<bool> wellPathClip;
|
||||
caf::PdmField<int> wellPathClipZDistance;
|
||||
|
||||
void loadDataAndUpdate();
|
||||
bool loadDataAndUpdate();
|
||||
std::vector<RimWellPath*> addWellPaths( QStringList filePaths, QStringList* errorMessages );
|
||||
std::vector<RimWellPath*> allWellPaths() const;
|
||||
void removeWellPath( gsl::not_null<RimWellPath*> wellPath );
|
||||
|
@ -695,6 +695,7 @@ void ProgressInfoStatic::finished()
|
||||
if ( dialog )
|
||||
{
|
||||
QObject::disconnect( dialog, &QProgressDialog::canceled, nullptr, nullptr );
|
||||
s_isButtonConnected = false;
|
||||
|
||||
dialog->reset();
|
||||
dialog->close();
|
||||
|
Loading…
Reference in New Issue
Block a user