Set default background color of contour maps to off-white

This commit is contained in:
Jacob Støren 2018-10-31 09:39:27 +01:00
parent a1705c5e39
commit 6374708520
3 changed files with 12 additions and 1 deletions

View File

@ -755,6 +755,14 @@ void Rim3dView::createHighlightAndGridBoxDisplayModel()
m_viewer->showGridBox(m_showGridBox());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setBackgroundColor(const cvf::Color3f& newBackgroundColor)
{
m_backgroundColor = newBackgroundColor;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -106,6 +106,7 @@ public:
void setSurfOnlyDrawstyle();
void setFaultMeshSurfDrawstyle();
void setSurfaceDrawstyle();
void setBackgroundColor(const cvf::Color3f& newBackgroundColor);
void disableLighting(bool disable);
bool isLightingDisabled() const;
@ -164,7 +165,7 @@ protected:
void createHighlightAndGridBoxDisplayModel();
// Implementation of RiuViewerToViewInterface
cvf::Color3f backgroundColor() const override { return m_backgroundColor(); }
cvf::Color3f backgroundColor() const override { return m_backgroundColor(); }
void applyBackgroundColor();
// Abstract methods to implement in subclasses

View File

@ -322,6 +322,7 @@ Rim2dEclipseView* RimEclipseCase::create2dContourMapFrom3dView(const RimEclipseV
CVF_ASSERT(contourMap);
contourMap->setEclipseCase(this);
contourMap->setBackgroundColor(cvf::Color3f(1.0f, 1.0f, 0.98f)); // Ignore original view background
caf::PdmDocument::updateUiIconStateRecursively(contourMap);
@ -358,6 +359,7 @@ Rim2dEclipseView* RimEclipseCase::create2dContourMap()
contourMap->cellEdgeResult()->setResultVariable("MULT");
contourMap->cellEdgeResult()->setActive(false);
contourMap->fractureColors()->setDefaultResultName();
contourMap->setBackgroundColor(cvf::Color3f(1.0f, 1.0f, 0.98f));
}
caf::PdmDocument::updateUiIconStateRecursively(contourMap);