mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 18:32:10 -05:00
#8354 RFT file open : Inconsistent data might lead to crash
Use try/catch to avoid crash from RFT file reader. Avoid reading data when considering if menu items should be visible.
This commit is contained in:
1 parent
29db2bc012
commit
48843c50f6
5 files changed
+40
-6
No files matched your search
@@ -73,7 +73,30 @@ RimSimWellInView* RicWellLogTools::selectedSimulationWell( int* branchIndex )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellLogTools::wellHasRftData( const QString& wellName )
|
||||
bool RicWellLogTools::hasRftData()
|
||||
{
|
||||
RimEclipseResultCase* resultCase;
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( ( resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase ) ) )
|
||||
{
|
||||
if ( resultCase->rftReader() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellLogTools::hasRftDataForWell( const QString& wellName )
|
||||
{
|
||||
RimEclipseResultCase* resultCase;
|
||||
std::vector<RimCase*> cases;
|
||||
|
||||
Reference in new issue
Block a user