mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show error message if no flow data is available
This commit is contained in:
@@ -705,6 +705,20 @@ RimWellPath* RimWellPlotTools::wellPathByWellPathNameOrSimWellName( const QStrin
|
||||
return wellPath != nullptr ? wellPath : proj->wellPathFromSimWellName( wellPathNameOrSimwellName );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RimWellPlotTools::wellPathsContainingFlow()
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
for ( RimWellPath* wellPath : RimProject::current()->allWellPaths() )
|
||||
{
|
||||
if ( wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData( wellPath ) ) wellPaths.push_back( wellPath );
|
||||
}
|
||||
|
||||
return wellPaths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
|
||||
static std::vector<RimWellLogFile*> wellLogFilesContainingFlow( const QString& wellName );
|
||||
static RimWellPath* wellPathByWellPathNameOrSimWellName( const QString& wellPathNameOrSimwellName );
|
||||
static std::vector<RimWellPath*> wellPathsContainingFlow();
|
||||
|
||||
// RFT Only
|
||||
private:
|
||||
|
||||
@@ -1031,18 +1031,11 @@ void RimWellPltPlot::syncSourcesIoFieldFromGuiField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPltPlot::calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options )
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
|
||||
if ( proj != nullptr )
|
||||
auto wellPathsContainingFlowData = RimWellPlotTools::wellPathsContainingFlow();
|
||||
for ( const RimWellPath* const wellPath : wellPathsContainingFlowData )
|
||||
{
|
||||
// Observed wells
|
||||
for ( const RimWellPath* const wellPath : proj->allWellPaths() )
|
||||
{
|
||||
const QString wellName = wellPath->name();
|
||||
|
||||
if ( wellPath->wellPathGeometry() || RimWellPlotTools::hasFlowData( wellPath ) )
|
||||
options.push_back( caf::PdmOptionItemInfo( wellName, wellName ) );
|
||||
}
|
||||
const QString wellName = wellPath->name();
|
||||
options.push_back( caf::PdmOptionItemInfo( wellName, wellName ) );
|
||||
}
|
||||
|
||||
options.push_back( caf::PdmOptionItemInfo( "None", "" ) );
|
||||
|
||||
Reference in New Issue
Block a user