Only create and show plot window if we import a summary file. (#9155)

* Only create and show plot window if we import a summary file. If window is already there, no change.
This commit is contained in:
jonjenssen
2022-08-04 07:14:12 +02:00
committed by GitHub
parent 3e0cda4dba
commit 82f6dc74c1

View File

@@ -1188,19 +1188,18 @@ void RiaGuiApplication::invokeProcessEvents( QEventLoop::ProcessEventsFlags flag
//--------------------------------------------------------------------------------------------------
void RiaGuiApplication::onFileSuccessfullyLoaded( const QString& fileName, RiaDefines::ImportFileType fileType )
{
if ( int( fileType ) & int( RiaDefines::ImportFileType::ANY_ECLIPSE_FILE ) )
if ( uint( fileType ) & uint( RiaDefines::ImportFileType::ANY_ECLIPSE_FILE ) )
{
getOrCreateAndShowMainPlotWindow();
if ( fileType != RiaDefines::ImportFileType::ECLIPSE_SUMMARY_FILE )
if ( fileType == RiaDefines::ImportFileType::ECLIPSE_SUMMARY_FILE )
{
if ( mainWindow() )
{
mainWindow()->raise();
}
auto plotWindow = getOrCreateAndShowMainPlotWindow();
plotWindow->raise();
}
else
{
auto mainWindow = getOrCreateAndShowMainWindow();
mainWindow->raise();
}
auto plotWindow = getOrCreateMainPlotWindow();
plotWindow->show();
}
if ( !RiaGuiApplication::hasValidProjectFileExtension( fileName ) )