mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk : Fixed typo of firstAncestorOrThisOfType
This commit is contained in:
parent
1bcfc41542
commit
531aaaa445
@ -49,7 +49,7 @@ void RicAppendCrossSectionFeature::onActionTriggered(bool isChecked)
|
||||
CVF_ASSERT(collection.size() == 1);
|
||||
|
||||
RimCrossSectionCollection* crossSectionCollection = NULL;
|
||||
collection[0]->firstAnchestorOrThisOfType(crossSectionCollection);
|
||||
collection[0]->firstAncestorOrThisOfType(crossSectionCollection);
|
||||
|
||||
CVF_ASSERT(crossSectionCollection);
|
||||
|
||||
|
@ -92,7 +92,7 @@ bool RicNewPolylineCrossSectionFeature::handleEvent(cvf::Object* eventObject)
|
||||
if (crossSection->inputFromViewerEnabled())
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
crossSection->firstAnchestorOrThisOfType(rimCase);
|
||||
crossSection->firstAncestorOrThisOfType(rimCase);
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
crossSection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint);
|
||||
|
@ -53,7 +53,7 @@ void RicNewSimWellCrossSectionFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseWell* eclWell = collection[0];
|
||||
|
||||
RimEclipseView* eclView = NULL;
|
||||
eclWell->firstAnchestorOrThisOfType(eclView);
|
||||
eclWell->firstAncestorOrThisOfType(eclView);
|
||||
CVF_ASSERT(eclView);
|
||||
|
||||
RicNewSimWellCrossSectionCmd* cmd = new RicNewSimWellCrossSectionCmd(eclView->crossSectionCollection, eclWell);
|
||||
|
@ -99,7 +99,7 @@ RimIdenticalGridCaseGroup* RicPasteFeatureImpl::findGridCaseGroup(PdmObjectHandl
|
||||
dynamic_cast<RimEclipseCase*>(objectHandle))
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
objectHandle->firstAnchestorOrThisOfType(gridCaseGroup);
|
||||
objectHandle->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
return gridCaseGroup;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ bool RicAddEclipseInputPropertyFeature::isCommandEnabled()
|
||||
{
|
||||
RimEclipseInputCaseOpm* inputCaseOpm = NULL;
|
||||
|
||||
inputProp->firstAnchestorOrThisOfType(inputCaseOpm);
|
||||
inputProp->firstAncestorOrThisOfType(inputCaseOpm);
|
||||
if (inputCaseOpm)
|
||||
{
|
||||
return false;
|
||||
|
@ -42,7 +42,7 @@ bool RicAddOpmInputPropertyFeature::isCommandEnabled()
|
||||
{
|
||||
RimEclipseInputCaseOpm* inputCaseOpm = NULL;
|
||||
|
||||
inputProp->firstAnchestorOrThisOfType(inputCaseOpm);
|
||||
inputProp->firstAncestorOrThisOfType(inputCaseOpm);
|
||||
if (inputCaseOpm)
|
||||
{
|
||||
return true;
|
||||
@ -103,7 +103,7 @@ void RicAddOpmInputPropertyFeature::addEclipseInputProperty(const QStringList& f
|
||||
|
||||
RimEclipseInputCaseOpm* inputCaseOpm = NULL;
|
||||
|
||||
inputPropertyCollection->firstAnchestorOrThisOfType(inputCaseOpm);
|
||||
inputPropertyCollection->firstAncestorOrThisOfType(inputCaseOpm);
|
||||
if (inputCaseOpm)
|
||||
{
|
||||
inputCaseOpm->appendPropertiesFromStandaloneFiles(fileNames);
|
||||
|
@ -220,7 +220,7 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
|
||||
for (size_t i = 0; i < casesToBeDeleted.size(); i++)
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
casesToBeDeleted[i]->firstAnchestorOrThisOfType(gridCaseGroup);
|
||||
casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
|
||||
if (statisticsCase)
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
statisticsCase->firstAnchestorOrThisOfType(gridCaseGroup);
|
||||
statisticsCase->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : NULL;
|
||||
return caseCollection ? caseCollection->reservoirs.size() > 0 : false;
|
||||
|
@ -81,10 +81,10 @@ void RicDeleteItemExec::redo()
|
||||
parentObj->uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimView* view = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(view);
|
||||
parentObj->firstAncestorOrThisOfType(view);
|
||||
|
||||
RimCellRangeFilterCollection* rangeFilterColl;
|
||||
parentObj->firstAnchestorOrThisOfType(rangeFilterColl);
|
||||
parentObj->firstAncestorOrThisOfType(rangeFilterColl);
|
||||
|
||||
if (rangeFilterColl)
|
||||
{
|
||||
@ -92,10 +92,10 @@ void RicDeleteItemExec::redo()
|
||||
}
|
||||
|
||||
RimEclipsePropertyFilterCollection* eclipsePropColl;
|
||||
parentObj->firstAnchestorOrThisOfType(eclipsePropColl);
|
||||
parentObj->firstAncestorOrThisOfType(eclipsePropColl);
|
||||
|
||||
RimGeoMechPropertyFilterCollection* geoMechPropColl;
|
||||
parentObj->firstAnchestorOrThisOfType(geoMechPropColl);
|
||||
parentObj->firstAncestorOrThisOfType(geoMechPropColl);
|
||||
|
||||
if (view && (eclipsePropColl || geoMechPropColl))
|
||||
{
|
||||
@ -104,14 +104,14 @@ void RicDeleteItemExec::redo()
|
||||
}
|
||||
|
||||
RimCrossSectionCollection* crossSectionColl;
|
||||
parentObj->firstAnchestorOrThisOfType(crossSectionColl);
|
||||
parentObj->firstAncestorOrThisOfType(crossSectionColl);
|
||||
if (view && crossSectionColl)
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
RimWellPathCollection* wellPathColl;
|
||||
parentObj->firstAnchestorOrThisOfType(wellPathColl);
|
||||
parentObj->firstAncestorOrThisOfType(wellPathColl);
|
||||
|
||||
if (wellPathColl)
|
||||
{
|
||||
@ -121,7 +121,7 @@ void RicDeleteItemExec::redo()
|
||||
// Update due to deletion of curves (not tracks, handled separatly)
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
parentObj->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
parentObj->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
@ -129,7 +129,7 @@ void RicDeleteItemExec::redo()
|
||||
}
|
||||
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
parentObj->firstAnchestorOrThisOfType(wellLogPlotTrack);
|
||||
parentObj->firstAncestorOrThisOfType(wellLogPlotTrack);
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
wellLogPlotTrack->updateXZoom();
|
||||
@ -144,7 +144,7 @@ void RicDeleteItemExec::redo()
|
||||
if (wellLogPlotCollection->wellLogPlots.empty())
|
||||
{
|
||||
RimProject* project = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(project);
|
||||
parentObj->firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
project->updateConnectedEditors();
|
||||
@ -153,13 +153,13 @@ void RicDeleteItemExec::redo()
|
||||
}
|
||||
|
||||
RimViewLinkerCollection* viewLinkerCollection = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(viewLinkerCollection);
|
||||
parentObj->firstAncestorOrThisOfType(viewLinkerCollection);
|
||||
if (viewLinkerCollection)
|
||||
{
|
||||
viewLinkerCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimProject* project = NULL;
|
||||
parentObj->firstAnchestorOrThisOfType(project);
|
||||
parentObj->firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
// Update visibility of top level Linked Views item in the project tree
|
||||
|
@ -90,7 +90,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
|
||||
bool RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable(caf::PdmObjectHandle* object)
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
object->firstAnchestorOrThisOfType(rimView);
|
||||
object->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
RimViewController* vc = rimView->viewController();
|
||||
|
@ -38,7 +38,7 @@ bool RicRangeFilterFeatureImpl::isRangeFilterCommandAvailable()
|
||||
if (!rangeFilterCollection) return false;
|
||||
|
||||
RimView* view;
|
||||
rangeFilterCollection->firstAnchestorOrThisOfType(view);
|
||||
rangeFilterCollection->firstAncestorOrThisOfType(view);
|
||||
if (view)
|
||||
{
|
||||
RimViewController* vc = view->viewController();
|
||||
@ -80,7 +80,7 @@ RimCellRangeFilterCollection* RicRangeFilterFeatureImpl::findRangeFilterCollecti
|
||||
}
|
||||
else if (selectedRangeFilter.size() > 0)
|
||||
{
|
||||
selectedRangeFilter[0]->firstAnchestorOrThisOfType(rangeFilterCollection);
|
||||
selectedRangeFilter[0]->firstAncestorOrThisOfType(rangeFilterCollection);
|
||||
}
|
||||
|
||||
assert(rangeFilterCollection);
|
||||
|
@ -82,7 +82,7 @@ QList<caf::PdmOptionItemInfo> RicLinkVisibleViewsFeatureUi::calculateValueOption
|
||||
for (size_t i = 0; i < m_allViews.size(); i++)
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
m_allViews[i]->firstAnchestorOrThisOfType(rimCase);
|
||||
m_allViews[i]->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
QIcon icon;
|
||||
if (rimCase)
|
||||
|
@ -50,7 +50,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
|
||||
for (size_t i = 0; i < managedViews.size(); i++)
|
||||
{
|
||||
RimViewLinker* rimLinked = NULL;
|
||||
managedViews[i]->firstAnchestorOrThisOfType(rimLinked);
|
||||
managedViews[i]->firstAncestorOrThisOfType(rimLinked);
|
||||
CVF_ASSERT(rimLinked);
|
||||
|
||||
linkedViews.push_back(rimLinked);
|
||||
|
@ -78,10 +78,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
|
||||
RimWellLogFileChannel* wellLog = selection[wlIdx];
|
||||
|
||||
RimWellPath* wellPath = NULL;
|
||||
wellLog->firstAnchestorOrThisOfType(wellPath);
|
||||
wellLog->firstAncestorOrThisOfType(wellPath);
|
||||
|
||||
RimWellLogFile* wellLogFile = NULL;
|
||||
wellLog->firstAnchestorOrThisOfType(wellLogFile);
|
||||
wellLog->firstAncestorOrThisOfType(wellLogFile);
|
||||
if (wellLogFile)
|
||||
{
|
||||
RimWellLogFileCurve* curve = new RimWellLogFileCurve;
|
||||
|
@ -40,7 +40,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
|
||||
if (selection.size() > 0)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = NULL;
|
||||
selection[0]->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
selection[0]->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot->trackCount() > 1)
|
||||
{
|
||||
return true;
|
||||
@ -63,7 +63,7 @@ void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
|
||||
RimWellLogTrack* track = selection[i];
|
||||
|
||||
RimWellLogPlot* wellLogPlot = NULL;
|
||||
track->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
track->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot && wellLogPlot->trackCount() > 1)
|
||||
{
|
||||
wellLogPlot->removeTrack(track);
|
||||
|
@ -71,7 +71,7 @@ void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
|
||||
plotCurve->loadDataAndUpdate();
|
||||
|
||||
RimWellLogPlot* plot = NULL;
|
||||
wellLogPlotTrack->firstAnchestorOrThisOfType(plot);
|
||||
wellLogPlotTrack->firstAncestorOrThisOfType(plot);
|
||||
if (plot && plotCurve->curveData())
|
||||
{
|
||||
plot->setDepthUnit(plotCurve->curveData()->depthUnit());
|
||||
|
@ -168,7 +168,7 @@ void RicNewWellLogFileCurveFeature::addWellLogChannelsToPlotTrack(RimWellLogTrac
|
||||
RimWellLogFileCurve* plotCurve = addCurve(plotTrack);
|
||||
|
||||
RimWellPath* wellPath;
|
||||
wellLogFileChannels[cIdx]->firstAnchestorOrThisOfType(wellPath);
|
||||
wellLogFileChannels[cIdx]->firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
plotCurve->setWellPath(wellPath);
|
||||
|
@ -43,14 +43,14 @@ void RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(RimWellLogTrac
|
||||
RimWellLogCurve* curve = curves[cIdx];
|
||||
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
curve->firstAnchestorOrThisOfType(wellLogPlotTrack);
|
||||
curve->firstAncestorOrThisOfType(wellLogPlotTrack);
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
wellLogPlotTrack->removeCurve(curve);
|
||||
wellLogPlotTrack->updateConnectedEditors();
|
||||
srcTracks.insert(wellLogPlotTrack);
|
||||
RimWellLogPlot* plot;
|
||||
wellLogPlotTrack->firstAnchestorOrThisOfType(plot);
|
||||
wellLogPlotTrack->firstAncestorOrThisOfType(plot);
|
||||
if (plot) srcPlots.insert(plot);
|
||||
}
|
||||
}
|
||||
@ -94,7 +94,7 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(RimWellLogPlot* dst
|
||||
RimWellLogTrack* track = tracksToMove[tIdx];
|
||||
|
||||
RimWellLogPlot* srcPlot;
|
||||
track->firstAnchestorOrThisOfType(srcPlot);
|
||||
track->firstAncestorOrThisOfType(srcPlot);
|
||||
if (srcPlot)
|
||||
{
|
||||
srcPlot->removeTrack(track);
|
||||
|
@ -61,7 +61,7 @@ void RicWellPathDeleteFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPath* wellPath = objects[0];
|
||||
|
||||
RimWellPathCollection* wellPathCollection = NULL;
|
||||
wellPath->firstAnchestorOrThisOfType(wellPathCollection);
|
||||
wellPath->firstAncestorOrThisOfType(wellPathCollection);
|
||||
|
||||
wellPathCollection->removeWellPath(wellPath);;
|
||||
delete wellPath;
|
||||
|
@ -60,7 +60,7 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject)
|
||||
if (!activeView) return false;
|
||||
|
||||
RimCase* rimCase = NULL;
|
||||
activeView->firstAnchestorOrThisOfType(rimCase);
|
||||
activeView->firstAncestorOrThisOfType(rimCase);
|
||||
if (rimCase)
|
||||
{
|
||||
displayModelOffset = rimCase->displayModelOffset();
|
||||
|
@ -291,7 +291,7 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
|
||||
}
|
||||
|
||||
RimView* view = NULL;
|
||||
cellResultColors->firstAnchestorOrThisOfType(view);
|
||||
cellResultColors->firstAncestorOrThisOfType(view);
|
||||
CVF_ASSERT(view);
|
||||
|
||||
RivScalarMapperUtils::applyTextureResultsToPart(m_surfaceFaces.p(),
|
||||
|
@ -87,7 +87,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
if (!m_crossSectionGenerator->isAnyGeometryPresent()) return;
|
||||
|
||||
RimEclipseView* eclipseView;
|
||||
m_rimCrossSection->firstAnchestorOrThisOfType(eclipseView);
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
@ -150,7 +150,7 @@ void RivCrossSectionPartMgr::updateCellResultColor(size_t timeStepIndex)
|
||||
}
|
||||
|
||||
RimGeoMechView* geoView;
|
||||
m_rimCrossSection->firstAnchestorOrThisOfType(geoView);
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(geoView);
|
||||
|
||||
if (geoView)
|
||||
{
|
||||
@ -518,7 +518,7 @@ cvf::ref<RivCrossSectionHexGridIntf> RivCrossSectionPartMgr::createHexGridInterf
|
||||
{
|
||||
|
||||
RimEclipseView* eclipseView;
|
||||
m_rimCrossSection->firstAnchestorOrThisOfType(eclipseView);
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(eclipseView);
|
||||
if (eclipseView)
|
||||
{
|
||||
RigMainGrid* grid = NULL;
|
||||
@ -527,7 +527,7 @@ cvf::ref<RivCrossSectionHexGridIntf> RivCrossSectionPartMgr::createHexGridInterf
|
||||
}
|
||||
|
||||
RimGeoMechView* geoView;
|
||||
m_rimCrossSection->firstAnchestorOrThisOfType(geoView);
|
||||
m_rimCrossSection->firstAncestorOrThisOfType(geoView);
|
||||
if (geoView)
|
||||
{
|
||||
RigFemPart* femPart = geoView->geoMechCase()->geoMechData()->femParts()->part(0);
|
||||
|
@ -456,7 +456,7 @@ void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part)
|
||||
if (noConstRimFault)
|
||||
{
|
||||
RimFaultCollection* parentObject;
|
||||
noConstRimFault->firstAnchestorOrThisOfType(parentObject);
|
||||
noConstRimFault->firstAncestorOrThisOfType(parentObject);
|
||||
if (parentObject)
|
||||
{
|
||||
defWellLabelColor = parentObject->faultLabelColor();;
|
||||
|
@ -88,7 +88,7 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl
|
||||
cvf::BoundingBox wellPathClipBoundingBox)
|
||||
{
|
||||
RimWellPathCollection* wellPathCollection = NULL;
|
||||
m_rimWellPath->firstAnchestorOrThisOfType(wellPathCollection);
|
||||
m_rimWellPath->firstAncestorOrThisOfType(wellPathCollection);
|
||||
if (!wellPathCollection) return;
|
||||
|
||||
RigWellPath* wellPathGeometry = m_rimWellPath->wellPathGeometry();
|
||||
@ -234,7 +234,7 @@ void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* m
|
||||
double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox)
|
||||
{
|
||||
RimWellPathCollection* wellPathCollection = NULL;
|
||||
m_rimWellPath->firstAnchestorOrThisOfType(wellPathCollection);
|
||||
m_rimWellPath->firstAncestorOrThisOfType(wellPathCollection);
|
||||
if (!wellPathCollection) return;
|
||||
|
||||
if (m_rimWellPath.isNull()) return;
|
||||
|
@ -292,7 +292,7 @@ QList<caf::PdmOptionItemInfo> RimCellRangeFilter::calculateValueOptions(const ca
|
||||
bool RimCellRangeFilter::isRangeFilterControlled()
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
bool isRangeFilterControlled = false;
|
||||
|
@ -150,7 +150,7 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
|
||||
void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter)
|
||||
{
|
||||
RimView* view = NULL;
|
||||
firstAnchestorOrThisOfType(view);
|
||||
firstAncestorOrThisOfType(view);
|
||||
|
||||
if (view->isMasterView())
|
||||
{
|
||||
@ -306,7 +306,7 @@ RigFemPartCollection* RimCellRangeFilterCollection::femPartColl() const
|
||||
RimView* RimCellRangeFilterCollection::baseView() const
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
|
||||
return rimView;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ caf::PdmFieldHandle* RimCrossSection::objectToggleField()
|
||||
RimEclipseWellCollection* RimCrossSection::simulationWellCollection()
|
||||
{
|
||||
RimEclipseView* eclipseView = NULL;
|
||||
firstAnchestorOrThisOfType(eclipseView);
|
||||
firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
if (eclipseView)
|
||||
{
|
||||
@ -425,7 +425,7 @@ void RimCrossSection::addExtents(std::vector<cvf::Vec3d> &polyLine) const
|
||||
void RimCrossSection::updateWellExtentDefaultValue()
|
||||
{
|
||||
RimCase* ownerCase = NULL;
|
||||
firstAnchestorOrThisOfType(ownerCase);
|
||||
firstAncestorOrThisOfType(ownerCase);
|
||||
|
||||
if (ownerCase)
|
||||
{
|
||||
@ -463,7 +463,7 @@ void RimCrossSection::updateName()
|
||||
void RimCrossSection::clipToReservoir(std::vector<cvf::Vec3d> &polyLine) const
|
||||
{
|
||||
RimCase* ownerCase = NULL;
|
||||
firstAnchestorOrThisOfType(ownerCase);
|
||||
firstAncestorOrThisOfType(ownerCase);
|
||||
|
||||
std::vector<cvf::Vec3d> clippedPolyLine;
|
||||
|
||||
@ -551,7 +551,7 @@ void RimCrossSection::rebuildGeometryAndScheduleCreateDisplayModel()
|
||||
m_crossSectionPartMgr = NULL;
|
||||
|
||||
RimView* rimView = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimView);
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
@ -124,7 +124,7 @@ void RimCrossSectionCollection::appendCrossSection(RimCrossSection* crossSection
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(crossSection);
|
||||
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
@ -139,7 +139,7 @@ void RimCrossSectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* chan
|
||||
if (changedField == &isActive)
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
@ -235,7 +235,7 @@ void RimEclipsePropertyFilter::updateReadOnlyStateOfAllFields()
|
||||
bool RimEclipsePropertyFilter::isPropertyFilterControlled()
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
bool isPropertyFilterControlled = false;
|
||||
|
@ -56,7 +56,7 @@ RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
||||
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
||||
{
|
||||
RimEclipseView* eclipseView = NULL;
|
||||
firstAnchestorOrThisOfType(eclipseView);
|
||||
firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
return eclipseView;
|
||||
}
|
||||
@ -122,7 +122,7 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
||||
bool activeIcon = true;
|
||||
|
||||
RimEclipseView* view = NULL;
|
||||
this->firstAnchestorOrThisOfType(view);
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
RimViewController* viewController = view->viewController();
|
||||
if (viewController && (viewController->isPropertyFilterOveridden()
|
||||
|| viewController->isVisibleCellsOveridden()))
|
||||
|
@ -128,12 +128,12 @@ void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
|
||||
RimEclipsePropertyFilter* propFilter = dynamic_cast<RimEclipsePropertyFilter*>(this->parentField()->ownerObject());
|
||||
RimView* view = NULL;
|
||||
this->firstAnchestorOrThisOfType(view);
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
RimWellLogCurve* curve = NULL;
|
||||
this->firstAnchestorOrThisOfType(curve);
|
||||
this->firstAncestorOrThisOfType(curve);
|
||||
|
||||
RimCellEdgeColors* cellEdgeColors = NULL;
|
||||
this->firstAnchestorOrThisOfType(cellEdgeColors);
|
||||
this->firstAncestorOrThisOfType(cellEdgeColors);
|
||||
|
||||
if (&m_resultVariableUiField == changedField)
|
||||
{
|
||||
@ -217,19 +217,19 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
|
||||
bool showPerFaceResultsFirst = false;
|
||||
|
||||
RimEclipseFaultColors* rimEclipseFaultColors = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimEclipseFaultColors);
|
||||
this->firstAncestorOrThisOfType(rimEclipseFaultColors);
|
||||
if (rimEclipseFaultColors) showPerFaceResultsFirst = true;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> optionItems = calculateValueOptionsForSpecifiedDerivedListPosition(showPerFaceResultsFirst, fieldNeedingOptions, useOptionsOnly);
|
||||
|
||||
RimWellLogCurve* curve = NULL;
|
||||
this->firstAnchestorOrThisOfType(curve);
|
||||
this->firstAncestorOrThisOfType(curve);
|
||||
|
||||
RimEclipsePropertyFilter* propFilter = NULL;
|
||||
this->firstAnchestorOrThisOfType(propFilter);
|
||||
this->firstAncestorOrThisOfType(propFilter);
|
||||
|
||||
RimCellEdgeColors* cellEdge = NULL;
|
||||
this->firstAnchestorOrThisOfType(cellEdge);
|
||||
this->firstAncestorOrThisOfType(cellEdge);
|
||||
|
||||
if (propFilter || curve || cellEdge)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ void RimFault::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const Q
|
||||
{
|
||||
RimEclipseView* reservoirView = NULL;
|
||||
|
||||
this->firstAnchestorOrThisOfType(reservoirView);
|
||||
this->firstAncestorOrThisOfType(reservoirView);
|
||||
|
||||
if (reservoirView)
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ RimGeoMechCellColors::~RimGeoMechCellColors(void)
|
||||
void RimGeoMechCellColors::updateIconState()
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimView);
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
RimViewController* viewController = rimView->viewController();
|
||||
|
@ -184,7 +184,7 @@ void RimGeoMechPropertyFilter::updateReadOnlyStateOfAllFields()
|
||||
bool RimGeoMechPropertyFilter::isPropertyFilterControlled()
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
bool isPropertyFilterControlled = false;
|
||||
|
@ -56,7 +56,7 @@ RimGeoMechPropertyFilterCollection::~RimGeoMechPropertyFilterCollection()
|
||||
RimGeoMechView* RimGeoMechPropertyFilterCollection::reservoirView()
|
||||
{
|
||||
RimGeoMechView* geoMechView = NULL;
|
||||
firstAnchestorOrThisOfType(geoMechView);
|
||||
firstAncestorOrThisOfType(geoMechView);
|
||||
|
||||
return geoMechView;
|
||||
}
|
||||
@ -126,7 +126,7 @@ void RimGeoMechPropertyFilterCollection::updateIconState()
|
||||
bool activeIcon = true;
|
||||
|
||||
RimGeoMechView* view = NULL;
|
||||
this->firstAnchestorOrThisOfType(view);
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
RimViewController* viewController = view->viewController();
|
||||
if (viewController && ( viewController->isPropertyFilterOveridden()
|
||||
|| viewController->isVisibleCellsOveridden()))
|
||||
|
@ -149,9 +149,9 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
|
||||
// Get the possible property filter owner
|
||||
RimGeoMechPropertyFilter* propFilter = dynamic_cast<RimGeoMechPropertyFilter*>(this->parentField()->ownerObject());
|
||||
RimView* view = NULL;
|
||||
this->firstAnchestorOrThisOfType(view);
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
RimWellLogCurve* curve = NULL;
|
||||
this->firstAnchestorOrThisOfType(curve);
|
||||
this->firstAncestorOrThisOfType(curve);
|
||||
|
||||
|
||||
if (&m_resultVariableUiField == changedField)
|
||||
|
@ -58,7 +58,7 @@ void RimGridCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
if (changedField == &isActive)
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimView);
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
CVF_ASSERT(rimView);
|
||||
|
||||
rimView->showGridCells(isActive);
|
||||
|
@ -774,11 +774,11 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
bool isCategoryResult = false;
|
||||
{
|
||||
RimEclipseCellColors* eclCellColors = nullptr;
|
||||
this->firstAnchestorOrThisOfType(eclCellColors);
|
||||
this->firstAncestorOrThisOfType(eclCellColors);
|
||||
RimGeoMechCellColors* gmCellColors = nullptr;
|
||||
this->firstAnchestorOrThisOfType(gmCellColors);
|
||||
this->firstAncestorOrThisOfType(gmCellColors);
|
||||
RimCellEdgeColors* eclCellEdgColors = nullptr;
|
||||
this->firstAnchestorOrThisOfType(eclCellEdgColors);
|
||||
this->firstAncestorOrThisOfType(eclCellEdgColors);
|
||||
|
||||
if ( ( eclCellColors && eclCellColors->hasCategoryResult())
|
||||
|| ( gmCellColors && gmCellColors->hasCategoryResult())
|
||||
|
@ -47,7 +47,7 @@ RimPropertyFilterCollection::~RimPropertyFilterCollection()
|
||||
void RimPropertyFilterCollection::updateDisplayModelNotifyManagedViews() const
|
||||
{
|
||||
RimView* view = NULL;
|
||||
this->firstAnchestorOrThisOfType(view);
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
CVF_ASSERT(view);
|
||||
|
||||
view->scheduleGeometryRegen(PROPERTY_FILTERED);
|
||||
@ -83,7 +83,7 @@ void RimPropertyFilterCollection::defineUiTreeOrdering(caf::PdmUiTreeOrdering& u
|
||||
PdmObject::defineUiTreeOrdering(uiTreeOrdering, uiConfigName);
|
||||
|
||||
RimView* rimView = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimView);
|
||||
this->firstAncestorOrThisOfType(rimView);
|
||||
RimViewController* viewController = rimView->viewController();
|
||||
if (viewController && (viewController->isPropertyFilterOveridden()
|
||||
|| viewController->isVisibleCellsOveridden()))
|
||||
|
@ -1514,7 +1514,7 @@ double RimReservoirCellResultsStorage::darchysValue()
|
||||
double darchy = 0.008527; // (ECLIPSE 100) (METRIC)
|
||||
|
||||
RimEclipseCase* rimCase = NULL;
|
||||
this->firstAnchestorOrThisOfType(rimCase);
|
||||
this->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
if (rimCase && rimCase->reservoirData())
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ void RimSummaryCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
}
|
||||
|
||||
RimProject* proj = NULL;
|
||||
this->firstAnchestorOrThisOfType(proj);
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
|
||||
RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection();
|
||||
RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection();
|
||||
@ -124,7 +124,7 @@ void RimSummaryCase::updateAutoShortName()
|
||||
if(m_useAutoShortName)
|
||||
{
|
||||
RimSummaryCaseCollection* summaryCaseCollection = NULL;
|
||||
this->firstAnchestorOrThisOfType(summaryCaseCollection);
|
||||
this->firstAncestorOrThisOfType(summaryCaseCollection);
|
||||
CVF_ASSERT(summaryCaseCollection);
|
||||
|
||||
m_shortName = summaryCaseCollection->uniqueShortNameForCase(this);
|
||||
|
@ -53,7 +53,7 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
||||
void RimSummaryCaseCollection::createSummaryCasesFromRelevantEclipseResultCases()
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
firstAnchestorOrThisOfType(proj);
|
||||
firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
std::vector<RimCase*> all3DCases;
|
||||
|
@ -321,7 +321,7 @@ QString RimSummaryCurve::createCurveAutoName()
|
||||
void RimSummaryCurve::updateZoomInParentPlot()
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAnchestorOrThisOfType(plot);
|
||||
firstAncestorOrThisOfType(plot);
|
||||
|
||||
plot->updateZoom();
|
||||
}
|
||||
@ -407,13 +407,13 @@ void RimSummaryCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
this->loadDataAndUpdate();
|
||||
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAnchestorOrThisOfType(plot);
|
||||
firstAncestorOrThisOfType(plot);
|
||||
plot->updateYAxisUnit();
|
||||
}
|
||||
else if (&m_showCurve == changedField)
|
||||
{
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAnchestorOrThisOfType(plot);
|
||||
firstAncestorOrThisOfType(plot);
|
||||
plot->updateYAxisUnit();
|
||||
}
|
||||
else if (changedField == &m_addCaseNameToCurveName)
|
||||
|
@ -233,7 +233,7 @@ void RimSummaryCurveFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
m_applyButtonField = false;
|
||||
|
||||
RimSummaryPlot* plot = nullptr;
|
||||
firstAnchestorOrThisOfType(plot);
|
||||
firstAncestorOrThisOfType(plot);
|
||||
plot->updateYAxisUnit();
|
||||
}
|
||||
}
|
||||
|
@ -108,14 +108,14 @@ QList<caf::PdmOptionItemInfo> RimViewController::calculateValueOptions(const caf
|
||||
}
|
||||
|
||||
RimViewLinker* linkedViews = NULL;
|
||||
this->firstAnchestorOrThisOfType(linkedViews);
|
||||
this->firstAncestorOrThisOfType(linkedViews);
|
||||
|
||||
for (size_t i = 0; i< views.size(); i++)
|
||||
{
|
||||
if (views[i] != linkedViews->masterView())
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
views[i]->firstAnchestorOrThisOfType(rimCase);
|
||||
views[i]->firstAncestorOrThisOfType(rimCase);
|
||||
QIcon icon;
|
||||
if (rimCase)
|
||||
{
|
||||
@ -351,7 +351,7 @@ void RimViewController::removeOverrides(RimView* view)
|
||||
void RimViewController::updateOptionSensitivity()
|
||||
{
|
||||
RimViewLinker* linkedViews = NULL;
|
||||
firstAnchestorOrThisOfType(linkedViews);
|
||||
firstAncestorOrThisOfType(linkedViews);
|
||||
CVF_ASSERT(linkedViews);
|
||||
|
||||
RimView* mainView = linkedViews->masterView();
|
||||
@ -504,7 +504,7 @@ void RimViewController::updateResultColorsControl()
|
||||
RimViewLinker* RimViewController::ownerViewLinker()
|
||||
{
|
||||
RimViewLinker* viewLinker = NULL;
|
||||
this->firstAnchestorOrThisOfType(viewLinker);
|
||||
this->firstAncestorOrThisOfType(viewLinker);
|
||||
|
||||
return viewLinker;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ QString RimViewLinker::displayNameForView(RimView* view)
|
||||
if (view)
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
view->firstAnchestorOrThisOfType(rimCase);
|
||||
view->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
displayName = rimCase->caseUserDescription() + ": " + view->name;
|
||||
}
|
||||
@ -370,7 +370,7 @@ void RimViewLinker::updateScaleZ(RimView* sourceView, double scaleZ)
|
||||
bool RimViewLinker::isActive()
|
||||
{
|
||||
RimViewLinkerCollection* viewLinkerCollection = NULL;
|
||||
this->firstAnchestorOrThisOfType(viewLinkerCollection);
|
||||
this->firstAncestorOrThisOfType(viewLinkerCollection);
|
||||
|
||||
if (!viewLinkerCollection)
|
||||
{
|
||||
@ -446,7 +446,7 @@ void RimViewLinker::findNameAndIconFromView(QString* name, QIcon* icon, RimView*
|
||||
if (view)
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
view->firstAnchestorOrThisOfType(rimCase);
|
||||
view->firstAncestorOrThisOfType(rimCase);
|
||||
|
||||
if (dynamic_cast<RimGeoMechCase*>(rimCase))
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ bool RimWellLogCurve::valueRange(double* minimumValue, double* maximumValue) con
|
||||
void RimWellLogCurve::updateZoomInParentPlot()
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
@ -117,7 +117,7 @@ void RimWellLogCurve::updateZoomInParentPlot()
|
||||
}
|
||||
|
||||
RimWellLogTrack* plotTrack;
|
||||
firstAnchestorOrThisOfType(plotTrack);
|
||||
firstAncestorOrThisOfType(plotTrack);
|
||||
if (plotTrack)
|
||||
{
|
||||
plotTrack->updateXZoomAndParentPlotDepthZoom();
|
||||
|
@ -204,7 +204,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
||||
m_geomResultDefinition->setGeoMechCase(geomCase);
|
||||
|
||||
RimWellLogPlotCollection* wellLogCollection = NULL;
|
||||
this->firstAnchestorOrThisOfType(wellLogCollection);
|
||||
this->firstAncestorOrThisOfType(wellLogCollection);
|
||||
CVF_ASSERT(wellLogCollection);
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
||||
@ -269,7 +269,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate()
|
||||
RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_METER;
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
CVF_ASSERT(wellLogPlot);
|
||||
|
||||
displayUnit = wellLogPlot->depthUnit();
|
||||
@ -442,7 +442,7 @@ void RimWellLogExtractionCurve::setLogScaleFromSelectedResult()
|
||||
if (resVar.toUpper().contains("PERM"))
|
||||
{
|
||||
RimWellLogTrack* track = NULL;
|
||||
this->firstAnchestorOrThisOfType(track);
|
||||
this->firstAncestorOrThisOfType(track);
|
||||
if (track)
|
||||
{
|
||||
if (track->curveCount() == 1)
|
||||
|
@ -143,7 +143,7 @@ bool RimWellLogFile::readFile(QString* errorMessage)
|
||||
}
|
||||
|
||||
RimWellPath* wellPath;
|
||||
firstAnchestorOrThisOfType(wellPath);
|
||||
firstAncestorOrThisOfType(wellPath);
|
||||
if (wellPath)
|
||||
{
|
||||
if (wellPath->filepath().isEmpty())
|
||||
|
@ -77,7 +77,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate()
|
||||
m_curveData = new RigWellLogCurveData;
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
CVF_ASSERT(wellLogPlot);
|
||||
|
||||
if (wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
||||
@ -267,7 +267,7 @@ QString RimWellLogFileCurve::createCurveAutoName()
|
||||
if (wellLogFile)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
CVF_ASSERT(wellLogPlot);
|
||||
|
||||
QString unitName = wellLogFile->wellLogChannelUnitString(m_wellLogChannnelName, wellLogPlot->depthUnit());
|
||||
|
@ -248,7 +248,7 @@ void RimWellLogPlot::moveTracks(RimWellLogTrack* insertAfterTrack, const std::ve
|
||||
RimWellLogTrack* track = tracksToMove[tIdx];
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
track->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
track->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->removeTrack(track);
|
||||
|
@ -96,7 +96,7 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
this->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
this->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->calculateAvailableDepthRange();
|
||||
@ -239,7 +239,7 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
CVF_ASSERT(m_wellLogTrackPlotWidget);
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle());
|
||||
@ -287,7 +287,7 @@ void RimWellLogTrack::updateXZoomAndParentPlotDepthZoom()
|
||||
if (m_wellLogTrackPlotWidget)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->updateDepthZoom();
|
||||
|
@ -105,7 +105,7 @@ RimWellPath::~RimWellPath()
|
||||
}
|
||||
|
||||
RimProject* project;
|
||||
firstAnchestorOrThisOfType(project);
|
||||
firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
if (project->mainPlotCollection())
|
||||
@ -149,7 +149,7 @@ RivWellPathPartMgr* RimWellPath::partMgr()
|
||||
if (m_wellPathPartMgr.isNull())
|
||||
{
|
||||
RimWellPathCollection* wpColl;
|
||||
this->firstAnchestorOrThisOfType(wpColl);
|
||||
this->firstAncestorOrThisOfType(wpColl);
|
||||
if (wpColl) m_wellPathPartMgr = new RivWellPathPartMgr(this);
|
||||
}
|
||||
|
||||
@ -164,7 +164,7 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
partMgr()->scheduleGeometryRegen();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAnchestorOrThisOfType(proj);
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ void RimWellPathCollection::scheduleGeometryRegenAndRedrawViews()
|
||||
{
|
||||
m_wellPathCollectionPartManager->scheduleGeometryRegen();
|
||||
RimProject* proj;
|
||||
this->firstAnchestorOrThisOfType(proj);
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ void RigSimulationWellCenterLineCalculator::calculateWellPipeCenterline(RimEclip
|
||||
{
|
||||
CVF_ASSERT(rimWell);
|
||||
RimEclipseView* eclipseView;
|
||||
rimWell->firstAnchestorOrThisOfType(eclipseView);
|
||||
rimWell->firstAncestorOrThisOfType(eclipseView);
|
||||
CVF_ASSERT(eclipseView);
|
||||
|
||||
isAutoDetectBranches = eclipseView->wellCollection()->isAutoDetectingBranches();
|
||||
|
@ -235,28 +235,28 @@ bool RiuDragDrop::dropMimeData(const QMimeData *data, Qt::DropAction action, int
|
||||
}
|
||||
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup;
|
||||
dropTarget->firstAnchestorOrThisOfType(gridCaseGroup);
|
||||
dropTarget->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
if (gridCaseGroup)
|
||||
{
|
||||
return handleGridCaseGroupDrop(action, draggedObjects, gridCaseGroup);
|
||||
}
|
||||
|
||||
RimWellLogCurve* wellLogPlotCurve;
|
||||
dropTarget->firstAnchestorOrThisOfType(wellLogPlotCurve);
|
||||
dropTarget->firstAncestorOrThisOfType(wellLogPlotCurve);
|
||||
if (wellLogPlotCurve)
|
||||
{
|
||||
return handleWellLogPlotCurveDrop(action, draggedObjects, wellLogPlotCurve);
|
||||
}
|
||||
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
dropTarget->firstAnchestorOrThisOfType(wellLogPlotTrack);
|
||||
dropTarget->firstAncestorOrThisOfType(wellLogPlotTrack);
|
||||
if (wellLogPlotTrack)
|
||||
{
|
||||
return handleWellLogPlotTrackDrop(action, draggedObjects, wellLogPlotTrack);
|
||||
}
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
dropTarget->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
dropTarget->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot)
|
||||
{
|
||||
return handleWellLogPlotDrop(action, draggedObjects, wellLogPlot);
|
||||
@ -361,7 +361,7 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop(Qt::DropAction action, caf::PdmObje
|
||||
if (action == Qt::MoveAction)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
trackTarget->firstAnchestorOrThisOfType(wellLogPlot);
|
||||
trackTarget->firstAncestorOrThisOfType(wellLogPlot);
|
||||
RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot(wellLogPlot, wellLogPlotTracks, trackTarget);
|
||||
return true;
|
||||
}
|
||||
@ -381,7 +381,7 @@ bool RiuDragDrop::handleWellLogPlotCurveDrop(Qt::DropAction action, caf::PdmObje
|
||||
if (action == Qt::MoveAction)
|
||||
{
|
||||
RimWellLogTrack* wellLogPlotTrack;
|
||||
curveDropTarget->firstAnchestorOrThisOfType(wellLogPlotTrack);
|
||||
curveDropTarget->firstAncestorOrThisOfType(wellLogPlotTrack);
|
||||
|
||||
RicWellLogPlotTrackFeatureImpl::moveCurvesToWellLogPlotTrack(wellLogPlotTrack, wellLogPlotCurves, curveDropTarget);
|
||||
return true;
|
||||
|
@ -490,7 +490,7 @@ void RiuMainPlotWindow::selectedObjectsChanged()
|
||||
|
||||
if (!selectedWellLogPlot)
|
||||
{
|
||||
firstSelectedObject->firstAnchestorOrThisOfType(selectedWellLogPlot);
|
||||
firstSelectedObject->firstAncestorOrThisOfType(selectedWellLogPlot);
|
||||
}
|
||||
|
||||
if (selectedWellLogPlot)
|
||||
@ -516,7 +516,7 @@ void RiuMainPlotWindow::selectedObjectsChanged()
|
||||
|
||||
if (!selectedSummaryPlot)
|
||||
{
|
||||
firstSelectedObject->firstAnchestorOrThisOfType(selectedSummaryPlot);
|
||||
firstSelectedObject->firstAncestorOrThisOfType(selectedSummaryPlot);
|
||||
}
|
||||
|
||||
if (selectedSummaryPlot)
|
||||
|
@ -1549,7 +1549,7 @@ void RiuMainWindow::selectedObjectsChanged()
|
||||
RimView* selectedReservoirView = dynamic_cast<RimView*>(firstSelectedObject);
|
||||
if (!selectedReservoirView)
|
||||
{
|
||||
firstSelectedObject->firstAnchestorOrThisOfType(selectedReservoirView);
|
||||
firstSelectedObject->firstAncestorOrThisOfType(selectedReservoirView);
|
||||
}
|
||||
|
||||
bool isActiveViewChanged = false;
|
||||
|
@ -170,7 +170,7 @@ bool RiuWellLogTrack::eventFilter(QObject* watched, QEvent* event)
|
||||
}
|
||||
|
||||
RimWellLogPlot* plotDefinition;
|
||||
m_plotTrackDefinition->firstAnchestorOrThisOfType(plotDefinition);
|
||||
m_plotTrackDefinition->firstAncestorOrThisOfType(plotDefinition);
|
||||
if (!plotDefinition)
|
||||
{
|
||||
return QwtPlot::eventFilter(watched, event);
|
||||
|
@ -31,9 +31,11 @@ public:
|
||||
|
||||
/// The field referencing this object as a child
|
||||
PdmFieldHandle* parentField() const;
|
||||
/// Convenience function. Traverses from parent to parents parent to find first object of the requested type.
|
||||
|
||||
/// Returns _this_ if _this_ is of requested type
|
||||
/// Traverses parents recursively and returns first parent of the requested type.
|
||||
template <typename T>
|
||||
void firstAnchestorOrThisOfType(T*& ancestor) const;
|
||||
void firstAncestorOrThisOfType(T*& ancestor) const;
|
||||
|
||||
/// Traverses all children recursively to find objects of the requested type. This object is also
|
||||
/// included if it is of the requested type.
|
||||
@ -111,7 +113,7 @@ namespace caf
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename T>
|
||||
void PdmObjectHandle::firstAnchestorOrThisOfType(T*& ancestor) const
|
||||
void PdmObjectHandle::firstAncestorOrThisOfType(T*& ancestor) const
|
||||
{
|
||||
ancestor = NULL;
|
||||
|
||||
@ -124,7 +126,7 @@ void PdmObjectHandle::firstAnchestorOrThisOfType(T*& ancestor) const
|
||||
return;
|
||||
}
|
||||
|
||||
// Search anchestors
|
||||
// Search parents for first type match
|
||||
|
||||
PdmObjectHandle* parent = NULL;
|
||||
PdmFieldHandle* parentField = this->parentField();
|
||||
|
Loading…
Reference in New Issue
Block a user