Close project if cancelling well path loading.

This commit is contained in:
Kristian Bendiksen
2024-08-16 13:45:53 +02:00
parent 9bea739252
commit b324fdb26b
4 changed files with 15 additions and 4 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -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 );