Set background and frame color from the view plus update frame margins.

This commit is contained in:
Gaute Lindkvist
2018-04-09 13:14:19 +02:00
parent 507229f84b
commit 63ffade452
14 changed files with 90 additions and 51 deletions
+14 -6
View File
@@ -583,12 +583,7 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
}
else if (changedField == &m_backgroundColor)
{
if (m_viewer != nullptr)
{
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
}
updateGridBoxData();
updateAnnotationItems();
this->applyBackgroundColor();
}
else if (changedField == &maximumFrameRate)
{
@@ -730,6 +725,19 @@ void Rim3dView::createHighlightAndGridBoxDisplayModel()
m_viewer->showGridBox(m_showGridBox());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::applyBackgroundColor()
{
if (m_viewer != nullptr)
{
m_viewer->mainCamera()->viewport()->setClearColor(cvf::Color4f(backgroundColor()));
}
updateGridBoxData();
updateAnnotationItems();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------