mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
#3633 2d Maps: Make contour lines optional
This commit is contained in:
1 parent
c8ebb0a4d1
commit
a842f3d445
3 files changed
+21
-6
No files matched your search
@@ -46,6 +46,8 @@ void Riv2dGridProjectionPartMgr::appendProjectionToModel(cvf::ModelBasicList* mo
|
|||||||
model->addPart(part.p());
|
model->addPart(part.p());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_2dGridProjection->showContourLines())
|
||||||
|
{
|
||||||
std::vector<cvf::ref<cvf::DrawableGeo>> contourDrawables = createContourPolygons(displayCoordTransform);
|
std::vector<cvf::ref<cvf::DrawableGeo>> contourDrawables = createContourPolygons(displayCoordTransform);
|
||||||
for (cvf::ref<cvf::DrawableGeo> contourDrawable : contourDrawables)
|
for (cvf::ref<cvf::DrawableGeo> contourDrawable : contourDrawables)
|
||||||
{
|
{
|
||||||
@@ -65,6 +67,7 @@ void Riv2dGridProjectionPartMgr::appendProjectionToModel(cvf::ModelBasicList* mo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ Rim2dGridProjection::Rim2dGridProjection()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_resultAggregation, "ResultAggregation", "Result Aggregation", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_resultAggregation, "ResultAggregation", "Result Aggregation", "", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_showContourLines, "ContourLines", true, "Show Contour Lines", "", "", "");
|
||||||
|
|
||||||
setName("2d Grid Projection");
|
setName("2d Grid Projection");
|
||||||
nameField()->uiCapability()->setUiReadOnly(true);
|
nameField()->uiCapability()->setUiReadOnly(true);
|
||||||
|
|
||||||
@@ -297,6 +299,14 @@ double Rim2dGridProjection::sampleSpacing() const
|
|||||||
return m_sampleSpacing;
|
return m_sampleSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool Rim2dGridProjection::showContourLines() const
|
||||||
|
{
|
||||||
|
return m_showContourLines();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -882,8 +892,11 @@ RigMainGrid* Rim2dGridProjection::mainGrid() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Rim2dGridProjection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
void Rim2dGridProjection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
{
|
{
|
||||||
if (changedField == &m_isChecked || changedField == &m_sampleSpacing || changedField == &m_resultAggregation)
|
if (changedField == &m_resultAggregation)
|
||||||
{
|
{
|
||||||
|
legendConfig()->disableAllTimeStepsRange(isSummationResult());
|
||||||
|
}
|
||||||
|
|
||||||
RimEclipseView* view = nullptr;
|
RimEclipseView* view = nullptr;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(view);
|
this->firstAncestorOrThisOfTypeAsserted(view);
|
||||||
view->updateConnectedEditors();
|
view->updateConnectedEditors();
|
||||||
@@ -892,11 +905,6 @@ void Rim2dGridProjection::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
|||||||
view->firstAncestorOrThisOfTypeAsserted(proj);
|
view->firstAncestorOrThisOfTypeAsserted(proj);
|
||||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
}
|
}
|
||||||
if (changedField == &m_resultAggregation)
|
|
||||||
{
|
|
||||||
legendConfig()->disableAllTimeStepsRange(isSummationResult());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ public:
|
|||||||
double maxValue() const;
|
double maxValue() const;
|
||||||
double minValue() const;
|
double minValue() const;
|
||||||
double sampleSpacing() const;
|
double sampleSpacing() const;
|
||||||
|
bool showContourLines() const;
|
||||||
|
|
||||||
void updateDefaultSampleSpacingFromGrid();
|
void updateDefaultSampleSpacingFromGrid();
|
||||||
const std::vector<double>& aggregatedResults() const;
|
const std::vector<double>& aggregatedResults() const;
|
||||||
bool isSummationResult() const;
|
bool isSummationResult() const;
|
||||||
@@ -111,6 +113,8 @@ protected:
|
|||||||
protected:
|
protected:
|
||||||
caf::PdmField<double> m_sampleSpacing;
|
caf::PdmField<double> m_sampleSpacing;
|
||||||
caf::PdmField<ResultAggregation> m_resultAggregation;
|
caf::PdmField<ResultAggregation> m_resultAggregation;
|
||||||
|
caf::PdmField<bool> m_showContourLines;
|
||||||
|
|
||||||
std::map<size_t, cvf::ref<cvf::UByteArray>> m_cellGridIdxVisibilityMap;
|
std::map<size_t, cvf::ref<cvf::UByteArray>> m_cellGridIdxVisibilityMap;
|
||||||
|
|
||||||
std::vector<double> m_aggregatedResults;
|
std::vector<double> m_aggregatedResults;
|
||||||
|
|||||||
Reference in new issue
Block a user