Error dialog : Do not display error dialog, write to logging window

For large projects with many missing files, the file open error dialog will be displayed many times
This commit is contained in:
Magne Sjaastad
2020-01-15 20:12:10 +01:00
parent 29e6b09ee9
commit 52d24f9439

View File

@@ -154,10 +154,6 @@ void RimWellPathCollection::loadDataAndUpdate()
QString errorMessage;
if ( !fWPath->readWellPathFile( &errorMessage, m_wellPathImporter ) )
{
if ( RiaGuiApplication::isRunning() )
{
QMessageBox::warning( Riu3DMainWindowTools::mainWindowWidget(), "File open error", errorMessage );
}
RiaLogging::warning( errorMessage );
}
}
@@ -169,21 +165,7 @@ void RimWellPathCollection::loadDataAndUpdate()
QString errorMessage;
if ( !wellLogFile->readFile( &errorMessage ) )
{
QString displayMessage = "Could not open the well log file: \n" + wellLogFile->fileName();
if ( !errorMessage.isEmpty() )
{
displayMessage += "\n\n";
displayMessage += errorMessage;
}
RiaLogging::warning( errorMessage );
if ( RiaGuiApplication::isRunning() )
{
QMessageBox::warning( Riu3DMainWindowTools::mainWindowWidget(),
"File open error",
displayMessage );
}
}
}
}