mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #9048 from OPM/9047-performance-avoid-update-project
- Avoid update of project when creating new objects - Added icon resource cache - Avoid use of descendantsIncludingThisOfType()
This commit is contained in:
@@ -82,7 +82,7 @@ void RicImportPolylinesAnnotationFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RimPolylinesFromFileAnnotation* lastCreatedOrUpdated = annotColl->importOrUpdatePolylinesFromFile( fileNames );
|
||||
|
||||
proj->updateConnectedEditors();
|
||||
proj->activeOilField()->updateConnectedEditors();
|
||||
|
||||
if ( lastCreatedOrUpdated )
|
||||
{
|
||||
|
||||
@@ -292,8 +292,6 @@ void RicNewStimPlanModelPlotFeature::createFaciesTrack( RimStimPlanModelPlot* pl
|
||||
faciesTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
}
|
||||
@@ -343,8 +341,6 @@ void RicNewStimPlanModelPlotFeature::createLayersTrack( RimStimPlanModelPlot* pl
|
||||
faciesTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
}
|
||||
@@ -430,8 +426,6 @@ void RicNewStimPlanModelPlotFeature::createParametersTrack( RimStimPlanModelPlot
|
||||
plotTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
|
||||
RiuCreateMultipleFractionsUi* multipleFractionsUi = this->multipleFractionsUi();
|
||||
if ( !multipleFractionsUi ) return;
|
||||
|
||||
std::set<RimWellPathFractureCollection*> fractureCollectionToUpdate;
|
||||
|
||||
auto items = multipleFractionsUi->locationsForNewFractures();
|
||||
for ( auto item : items )
|
||||
{
|
||||
@@ -127,6 +129,7 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
|
||||
|
||||
RimWellPathFracture* fracture = new RimWellPathFracture();
|
||||
fractureCollection->addFracture( fracture );
|
||||
fractureCollectionToUpdate.insert( fractureCollection );
|
||||
|
||||
fracture->setFractureUnit( item.wellPath->unitSystem() );
|
||||
fracture->setMeasuredDepth( item.measuredDepth );
|
||||
@@ -145,7 +148,11 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* proj = app->project();
|
||||
|
||||
proj->updateConnectedEditors();
|
||||
for ( auto coll : fractureCollectionToUpdate )
|
||||
{
|
||||
coll->updateConnectedEditors();
|
||||
}
|
||||
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered( bool isChecked )
|
||||
if ( eclipseCase )
|
||||
{
|
||||
proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase );
|
||||
proj->updateConnectedEditors();
|
||||
fractureCollection->updateConnectedEditors();
|
||||
}
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( fracture );
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ void RicNewSimWellFractureFeature::onActionTriggered( bool isChecked )
|
||||
if ( eclipseCase )
|
||||
{
|
||||
proj->reloadCompletionTypeResultsForEclipseCase( eclipseCase );
|
||||
proj->updateConnectedEditors();
|
||||
eclipseWell->simwellFractureCollection()->updateConnectedEditors();
|
||||
}
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( fracture );
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ RimStimPlanModel* RicNewStimPlanModelFeature::addStimPlanModel( RimWellPath*
|
||||
if ( project )
|
||||
{
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
project->updateAllRequiredEditors();
|
||||
stimPlanModelCollection->updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
if ( measuredDepth > 0.0 )
|
||||
|
||||
@@ -101,7 +101,7 @@ RimWellPathFracture* RicNewWellPathFractureFeature::addFracture( gsl::not_null<R
|
||||
if ( project )
|
||||
{
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
project->updateAllRequiredEditors();
|
||||
fractureCollection->updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( fracture );
|
||||
|
||||
@@ -325,7 +325,6 @@ ExtractionCurveType* RicWellLogTools::addExtractionCurve( RimWellLogTrack*
|
||||
plotTrack->updateConnectedEditors();
|
||||
plot->updateConnectedEditors();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( curve );
|
||||
|
||||
@@ -387,7 +386,6 @@ RimWellLogRftCurve*
|
||||
plotTrack->setFormationTrajectoryType( RimWellLogTrack::SIMULATION_WELL );
|
||||
plotTrack->updateConnectedEditors();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( curve );
|
||||
|
||||
@@ -416,7 +414,6 @@ RimWellLogFileCurve* RicWellLogTools::addFileCurve( RimWellLogTrack* plotTrack,
|
||||
|
||||
plotTrack->updateConnectedEditors();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( curve );
|
||||
|
||||
@@ -489,7 +486,6 @@ RimWellMeasurementCurve* RicWellLogTools::addWellMeasurementCurve( RimWellLogTra
|
||||
plotTrack->addCurve( curve );
|
||||
plotTrack->updateConnectedEditors();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( curve );
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void RicLinkVisibleViewsFeature::linkViews( std::vector<RimGridView*>& linkableV
|
||||
viewLinker->updateUiNameAndIcon();
|
||||
|
||||
proj->viewLinkerCollection.uiCapability()->updateConnectedEditors();
|
||||
proj->updateConnectedEditors();
|
||||
proj->viewLinkerCollection->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::setExpanded( proj->viewLinkerCollection() );
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void RicSetMasterViewFeature::onActionTriggered( bool isChecked )
|
||||
viewLinker->addDependentView( previousMasterView );
|
||||
|
||||
proj->viewLinkerCollection.uiCapability()->updateConnectedEditors();
|
||||
proj->updateConnectedEditors();
|
||||
proj->viewLinkerCollection->updateConnectedEditors();
|
||||
|
||||
// Set managed view collection to selected and expanded in project tree
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( viewLinker );
|
||||
|
||||
@@ -68,8 +68,6 @@ void RicAdd3dWellLogCurveFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( rim3dWellLogExtractionCurve );
|
||||
Riu3DMainWindowTools::setExpanded( selectedWellPath );
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ void RicAdd3dWellLogFileCurveFeature::onActionTriggered( bool isChecked )
|
||||
rim3dWellLogFileCurve->setDefaultFileCurveDataInfo();
|
||||
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( rim3dWellLogFileCurve );
|
||||
Riu3DMainWindowTools::setExpanded( selectedWellPath );
|
||||
|
||||
@@ -63,7 +63,6 @@ void RicAdd3dWellLogRftCurveFeature::onActionTriggered( bool isChecked )
|
||||
selectedWellPath->add3dWellLogCurve( rim3dWellLogRftCurve );
|
||||
|
||||
RimProject::current()->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( rim3dWellLogRftCurve );
|
||||
Riu3DMainWindowTools::setExpanded( selectedWellPath );
|
||||
|
||||
@@ -104,8 +104,6 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
plot->updateLayout();
|
||||
|
||||
RimProject::current()->updateConnectedEditors();
|
||||
|
||||
RiuPlotMainWindowTools::showPlotMainWindow();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
|
||||
RiuPlotMainWindowTools::setExpanded( plotTrack );
|
||||
|
||||
@@ -106,6 +106,8 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot( bool showAfterC
|
||||
QString( "Well Log Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots().size() ) );
|
||||
}
|
||||
|
||||
wellLogPlotColl->updateConnectedEditors();
|
||||
|
||||
if ( showAfterCreation )
|
||||
{
|
||||
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||
|
||||
Reference in New Issue
Block a user