mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added new field "Disable Lighting" (#311)
This commit is contained in:
@@ -90,6 +90,9 @@ RimView::RimView(void)
|
||||
CAF_PDM_InitField(&meshMode, "MeshMode", defaultMeshType, "Grid lines", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&surfaceMode, "SurfaceMode", "Grid surface", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_disableLighting, "DisableLighting", false, "Disable Lighting", "", "Disable light model for scalar result colors", "");
|
||||
m_disableLighting.setUiReadOnly(true);
|
||||
|
||||
m_previousGridModeMeshLinesWasFaults = false;
|
||||
}
|
||||
|
||||
@@ -217,7 +220,7 @@ void RimView::createDisplayModelAndRedraw()
|
||||
updateDisplayModelVisibility();
|
||||
}
|
||||
|
||||
RiuMainWindow::instance()->refreshAnimationActions();
|
||||
RiuMainWindow::instance()->refreshAnimationActions();
|
||||
}
|
||||
|
||||
|
||||
@@ -369,6 +372,32 @@ void RimView::setSurfaceDrawstyle()
|
||||
if (surfaceMode() != NO_SURFACE) surfaceMode.setValueFromUi(SURFACE);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimView::disableLighting(bool disable)
|
||||
{
|
||||
m_disableLighting = disable;
|
||||
updateCurrentTimeStepAndRedraw();
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimView::isLightingDisabled() const
|
||||
{
|
||||
return m_disableLighting();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimView::uiEnableDisableLighting(bool enable)
|
||||
{
|
||||
m_disableLighting.setUiReadOnly(!enable);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -416,6 +445,11 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
||||
updateDisplayModelVisibility();
|
||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||
}
|
||||
else if (changedField == &m_disableLighting)
|
||||
{
|
||||
createDisplayModel();
|
||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||
}
|
||||
else if (changedField == &name)
|
||||
{
|
||||
updateViewerWidgetWindowTitle();
|
||||
|
||||
@@ -87,6 +87,10 @@ public:
|
||||
void setSurfOnlyDrawstyle();
|
||||
void setFaultMeshSurfDrawstyle();
|
||||
void setSurfaceDrawstyle();
|
||||
|
||||
void disableLighting(bool disable);
|
||||
bool isLightingDisabled() const;
|
||||
void uiEnableDisableLighting(bool enable);
|
||||
|
||||
void setShowFaultsOnly(bool showFaults);
|
||||
bool isGridVisualizationMode() const;
|
||||
@@ -143,6 +147,7 @@ protected:
|
||||
|
||||
private:
|
||||
bool m_previousGridModeMeshLinesWasFaults;
|
||||
caf::PdmField<bool> m_disableLighting;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user