Skip to content

Commit

Permalink
Fix console application issue
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Aug 11, 2023
1 parent 07e830e commit aafcd2f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
delete duplicateCase;
}

if ( !candidateCases.empty() && RiuPlotMainWindow::instance()->isVisible() )
if ( !candidateCases.empty() && RiaGuiApplication::isRunning() && RiuPlotMainWindow::instance()->isVisible() )
{
RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { candidateCases.front() }, {} );
RiuPlotMainWindowTools::setExpanded( candidateCases.front() );
Expand All @@ -206,10 +206,10 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&

project->activeOilField()->completionTemplateCollection()->setDefaultUnitSystemBasedOnLoadedCases();

if ( RiuPlotMainWindow::instance()->isVisible() ) RiuPlotMainWindowTools::refreshToolbars();

if ( RiaGuiApplication::isRunning() )
{
if ( RiuPlotMainWindow::instance()->isVisible() ) RiuPlotMainWindowTools::refreshToolbars();

// Call process events to clear the queue. This make sure that we are able raise the 3D window on top of the
// plot window. Otherwise the event processing ends up with the plot window on top.
QApplication::processEvents();
Expand Down

0 comments on commit aafcd2f

Please sign in to comment.