Create LGR : Use all well cells if no completions are defined (#7285)

* #7274 Create LGR : Use all well cells if no completions are defined

* #7263  Create LGR : Not working in console mode 

Guard access to RiaApplication

* Add pytest for create_lgr_for_completion

* Add pytest for create_lgr_for_completion

* #7289 Script : Add execute of last used script

* #7291 Python : Guard access to RiaMainWindow
This commit is contained in:
Magne Sjaastad
2021-01-26 20:34:31 +01:00
committed by GitHub
parent f8aae6691d
commit 0ec612ae86
11 changed files with 101 additions and 20 deletions

View File

@@ -114,9 +114,13 @@ void RicCreateTemporaryLgrFeature::createLgrsForWellPaths( std::vector<RimWellPa
//--------------------------------------------------------------------------------------------------
void RicCreateTemporaryLgrFeature::updateViews( RimEclipseCase* eclipseCase )
{
RiaGuiApplication* app = RiaGuiApplication::instance();
RiaGuiApplication* guiApp = nullptr;
if ( RiaGuiApplication::isRunning() )
{
guiApp = RiaGuiApplication::instance();
}
app->clearAllSelections();
if ( guiApp ) guiApp->clearAllSelections();
deleteAllCachedData( eclipseCase );
RimProject::current()->mainPlotCollection()->deleteAllCachedData();
@@ -124,7 +128,7 @@ void RicCreateTemporaryLgrFeature::updateViews( RimEclipseCase* eclipseCase )
RimProject::current()->mainPlotCollection()->wellLogPlotCollection()->reloadAllPlots();
eclipseCase->createDisplayModelAndUpdateAllViews();
if ( guiApp ) eclipseCase->createDisplayModelAndUpdateAllViews();
}
//--------------------------------------------------------------------------------------------------