mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Do not allow opening the same odb file twice. The odb reader does not support that.
This commit is contained in:
committed by
Magne Sjaastad
parent
8ecd3c3c33
commit
cbadfd456a
@@ -78,6 +78,15 @@ RimGeoMechCase* RimGeoMechModels::copyCase( RimGeoMechCase* thecase, const QStri
|
||||
{
|
||||
std::vector<RimGeoMechCase*> newcases;
|
||||
|
||||
for ( auto gmcase : m_cases() )
|
||||
{
|
||||
if ( gmcase->gridFileName() == newInputFileName )
|
||||
{
|
||||
RiaLogging::warning( "File has already been opened. Cannot open the file twice! - " + newInputFileName );
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
RimGeoMechCase* copy = thecase->createCopy( newInputFileName );
|
||||
if ( !copy )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user