mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3573 Draw axis lines across the whole view for 2d Contour Maps.
This commit is contained in:
@@ -51,6 +51,8 @@ Rim2dEclipseView::Rim2dEclipseView()
|
||||
CAF_PDM_InitFieldNoDefault(&m_2dGridProjection, "Grid2dProjection", "2d Grid Projection", "", "", "");
|
||||
m_2dGridProjection = new Rim2dGridProjection();
|
||||
|
||||
CAF_PDM_InitField(&m_showAxisLines, "ShowAxisLines", true, "Show Axis Lines", "", "", "");
|
||||
|
||||
m_overlayInfoConfig->setIsActive(false);
|
||||
m_gridCollection->setActive(false); // This is also not added to the tree view, so cannot be enabled.
|
||||
wellCollection()->isActive = false;
|
||||
@@ -76,6 +78,7 @@ void Rim2dEclipseView::initAfterRead()
|
||||
{
|
||||
m_gridCollection->setActive(false); // This is also not added to the tree view, so cannot be enabled.
|
||||
disablePerspectiveProjectionField();
|
||||
setShowGridBox(false);
|
||||
meshMode.setValue(NO_MESH);
|
||||
surfaceMode.setValue(FAULTS);
|
||||
}
|
||||
@@ -101,7 +104,7 @@ void Rim2dEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering
|
||||
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup("Viewer");
|
||||
viewGroup->add(this->userDescriptionField());
|
||||
viewGroup->add(this->backgroundColorField());
|
||||
viewGroup->add(this->showGridBoxField());
|
||||
viewGroup->add(&m_showAxisLines);
|
||||
uiOrdering.skipRemainingFields(true);
|
||||
}
|
||||
|
||||
@@ -177,7 +180,7 @@ void Rim2dEclipseView::updateLegends()
|
||||
void Rim2dEclipseView::updateViewWidgetAfterCreation()
|
||||
{
|
||||
m_viewer->showAxisCross(false);
|
||||
m_viewer->showEdgeTickMarksXY(true);
|
||||
m_viewer->showEdgeTickMarksXY(true, m_showAxisLines());
|
||||
m_viewer->enableNavigationRotation(false);
|
||||
|
||||
Rim3dView::updateViewWidgetAfterCreation();
|
||||
@@ -203,3 +206,19 @@ void Rim2dEclipseView::onLoadDataAndUpdate()
|
||||
m_viewer->setView(cvf::Vec3d(0, 0, -1), cvf::Vec3d(0, 1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim2dEclipseView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_showAxisLines)
|
||||
{
|
||||
m_viewer->showEdgeTickMarksXY(true, m_showAxisLines());
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else
|
||||
{
|
||||
RimEclipseView::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,12 @@ protected:
|
||||
void updateViewWidgetAfterCreation() override;
|
||||
void updateViewFollowingRangeFilterUpdates() override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
private:
|
||||
cvf::ref<Riv2dGridProjectionPartMgr> m_grid2dProjectionPartMgr;
|
||||
caf::PdmChildField<Rim2dGridProjection*> m_2dGridProjection;
|
||||
caf::PdmField<bool> m_showAxisLines;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -763,6 +763,14 @@ void Rim3dView::setBackgroundColor(const cvf::Color3f& newBackgroundColor)
|
||||
m_backgroundColor = newBackgroundColor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setShowGridBox(bool showGridBox)
|
||||
{
|
||||
m_showGridBox = showGridBox;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -107,6 +107,7 @@ public:
|
||||
void setFaultMeshSurfDrawstyle();
|
||||
void setSurfaceDrawstyle();
|
||||
void setBackgroundColor(const cvf::Color3f& newBackgroundColor);
|
||||
void setShowGridBox(bool showGridBox);
|
||||
|
||||
void disableLighting(bool disable);
|
||||
bool isLightingDisabled() const;
|
||||
@@ -206,7 +207,6 @@ private:
|
||||
protected:
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_name; }
|
||||
caf::PdmFieldHandle* backgroundColorField() { return &m_backgroundColor; }
|
||||
caf::PdmFieldHandle* showGridBoxField() { return &m_showGridBox; }
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
Reference in New Issue
Block a user