mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1543 Naming and fixes from review
This commit is contained in:
@@ -87,7 +87,7 @@ void RimCompletionCellIntersectionCalc::calculateFishbonesIntersections(const Ri
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::getIntersectedCells(grid, fishbonesSubs->coordsForLateral(sub.subIndex, lateralIndex));
|
||||
for (auto& intersection : intersections)
|
||||
{
|
||||
values[intersection.m_hexIndex] = RimDefines::FISHBONE;
|
||||
values[intersection.m_hexIndex] = RimDefines::FISHBONES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
|
||||
firstAncestorOrThisOfTypeAsserted(project);
|
||||
if (project)
|
||||
{
|
||||
project->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ void RimFishbonesMultipleSubs::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -77,7 +77,7 @@ void RimPerforationCollection::appendPerforation(RimPerforationInterval* perfora
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -145,7 +145,7 @@ void RimPerforationInterval::fieldChangedByUi(const caf::PdmFieldHandle* changed
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace caf
|
||||
{
|
||||
addItem(RimDefines::WELL_PATH, "WELL_PATH", "Well Path");
|
||||
addItem(RimDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval");
|
||||
addItem(RimDefines::FISHBONE, "FISHBONE", "Fishbone");
|
||||
addItem(RimDefines::FISHBONES, "FISHBONES", "Fishbones");
|
||||
|
||||
setDefault(RimDefines::WELL_PATH);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
enum CompletionType {
|
||||
WELL_PATH,
|
||||
PERFORATION_INTERVAL,
|
||||
FISHBONE
|
||||
FISHBONES
|
||||
};
|
||||
|
||||
static bool isPerCellFaceResult(const QString& resultName);
|
||||
|
||||
@@ -249,7 +249,7 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView(const RimEclipseView* sourc
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCase::removeResult(RimDefines::ResultCatType type, const QString& resultName)
|
||||
void RimEclipseCase::removeEclipseResultAndScheduleRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName)
|
||||
{
|
||||
m_matrixModelResults->clearScalarResult(type, resultName);
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
RimEclipseView* createAndAddReservoirView();
|
||||
RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView);
|
||||
|
||||
void removeResult(RimDefines::ResultCatType type, const QString& resultName);
|
||||
void removeEclipseResultAndScheduleRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName);
|
||||
|
||||
virtual QString locationOnDisc() const { return QString(); }
|
||||
virtual QString gridFileName() const { return QString(); }
|
||||
|
||||
@@ -387,7 +387,7 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
|
||||
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
|
||||
|
||||
caf::AppEnum<RimDefines::CompletionType> wellPath(RimDefines::WELL_PATH);
|
||||
caf::AppEnum<RimDefines::CompletionType> fishbone(RimDefines::FISHBONE);
|
||||
caf::AppEnum<RimDefines::CompletionType> fishbone(RimDefines::FISHBONES);
|
||||
caf::AppEnum<RimDefines::CompletionType> perforationInterval(RimDefines::PERFORATION_INTERVAL);
|
||||
|
||||
categories.push_back(std::make_tuple(wellPath.uiText(), wellPath.index(), cvf::Color3::RED));
|
||||
|
||||
@@ -766,11 +766,19 @@ bool RimProject::showPlotWindow() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::removeResult(RimDefines::ResultCatType type, const QString & resultName)
|
||||
void RimProject::reloadCompletionTypeResultsInAllViews()
|
||||
{
|
||||
removeEclipseResultAndRedrawAllViews(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::removeEclipseResultAndRedrawAllViews(RimDefines::ResultCatType type, const QString & resultName)
|
||||
{
|
||||
for (RimEclipseCase* eclipseCase : activeOilField()->analysisModels->cases)
|
||||
{
|
||||
eclipseCase->removeResult(type, resultName);
|
||||
eclipseCase->removeEclipseResultAndScheduleRedrawAllViews(type, resultName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,8 @@ public:
|
||||
bool show3DWindow() const;
|
||||
bool showPlotWindow() const;
|
||||
|
||||
void removeResult(RimDefines::ResultCatType type, const QString& resultName);
|
||||
void reloadCompletionTypeResultsInAllViews();
|
||||
|
||||
|
||||
protected:
|
||||
// Overridden methods
|
||||
@@ -120,6 +121,7 @@ protected:
|
||||
|
||||
private:
|
||||
void appendScriptItems(QMenu* menu, RimScriptCollection* scriptCollection);
|
||||
void removeEclipseResultAndRedrawAllViews(RimDefines::ResultCatType type, const QString& resultName);
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_projectFileVersionString;
|
||||
|
||||
@@ -243,7 +243,7 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
if (changedField == &showWellPath)
|
||||
{
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@ void RimWellPathCollection::addWellPaths( QStringList filePaths )
|
||||
|
||||
RimProject* proj;
|
||||
firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->removeResult(RimDefines::DYNAMIC_NATIVE, RimDefines::completionTypeResultName());
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user