mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#4493 Fracture : Hide Fractures in tree view if no fractures in model
This commit is contained in:
parent
7c054c47f2
commit
8997ec00e0
@ -109,7 +109,6 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
|
||||
fracture->setFractureTemplate(fracDef);
|
||||
|
||||
simWell->updateConnectedEditors();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
activeView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
@ -117,10 +116,10 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
|
||||
simWell->firstAncestorOrThisOfType(eclipseCase);
|
||||
if (eclipseCase)
|
||||
{
|
||||
RimProject* project;
|
||||
eclipseCase->firstAncestorOrThisOfTypeAsserted(project);
|
||||
project->reloadCompletionTypeResultsForEclipseCase(eclipseCase);
|
||||
proj->reloadCompletionTypeResultsForEclipseCase(eclipseCase);
|
||||
proj->updateConnectedEditors();
|
||||
}
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -98,16 +98,15 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
||||
fracture->updateFracturePositionFromLocation();
|
||||
|
||||
eclipseWell->updateConnectedEditors();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(eclipseCase);
|
||||
if (eclipseCase)
|
||||
{
|
||||
RimProject* project;
|
||||
objHandle->firstAncestorOrThisOfTypeAsserted(project);
|
||||
project->reloadCompletionTypeResultsForEclipseCase(eclipseCase);
|
||||
proj->reloadCompletionTypeResultsForEclipseCase(eclipseCase);
|
||||
proj->updateConnectedEditors();
|
||||
}
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -96,15 +96,15 @@ void RicNewWellPathFractureFeature::addFracture(RimWellPath* wellPath, double me
|
||||
fracture->setFractureTemplate(fracDef);
|
||||
}
|
||||
|
||||
wellPath->updateConnectedEditors();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
|
||||
RimProject* project = nullptr;
|
||||
fractureCollection->firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
project->updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -1645,13 +1645,18 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
|
||||
uiTreeOrdering.add(faultResultSettings());
|
||||
uiTreeOrdering.add(wellCollection());
|
||||
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
CVF_ASSERT(project);
|
||||
RimOilField* oilfield = project->activeOilField();
|
||||
|
||||
if (oilfield && oilfield->fractureDefinitionCollection())
|
||||
{
|
||||
if (!oilfield->fractureDefinitionCollection()->fractureTemplates().empty())
|
||||
bool showFractureColors = false;
|
||||
|
||||
std::vector<RimFracture*> fractures;
|
||||
m_wellCollection->descendantsIncludingThisOfType(fractures);
|
||||
wellPathCollection()->descendantsIncludingThisOfType(fractures);
|
||||
if (!fractures.empty())
|
||||
{
|
||||
showFractureColors = true;
|
||||
}
|
||||
|
||||
if (showFractureColors)
|
||||
{
|
||||
uiTreeOrdering.add(fractureColors());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user