mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Faults: Always show fault color option
This commit is contained in:
parent
1ea31f61ba
commit
508334fcb0
@ -141,17 +141,12 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::updateCellColor(cvf::Color4f color)
|
||||
void RivReservoirFaultsPartMgr::applySingleColorEffect()
|
||||
{
|
||||
CVF_UNUSED(color);
|
||||
|
||||
// NB color is not used, as the color is defined per fault
|
||||
|
||||
for (size_t i = 0; i < m_faultParts.size(); i++)
|
||||
{
|
||||
m_faultParts[i]->applySingleColorEffect();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -159,9 +154,16 @@ void RivReservoirFaultsPartMgr::updateCellColor(cvf::Color4f color)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot)
|
||||
{
|
||||
for (size_t i = 0; i < m_faultParts.size(); i++)
|
||||
if (m_faultCollection->forceFaultColor())
|
||||
{
|
||||
m_faultParts[i]->updateCellResultColor(timeStepIndex, cellResultSlot);
|
||||
applySingleColorEffect();
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t i = 0; i < m_faultParts.size(); i++)
|
||||
{
|
||||
m_faultParts[i]->updateCellResultColor(timeStepIndex, cellResultSlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
void setTransform(cvf::Transform* scaleTransform);
|
||||
void setCellVisibility(cvf::UByteArray* cellVisibilities);
|
||||
|
||||
void updateCellColor(cvf::Color4f color);
|
||||
void applySingleColorEffect();
|
||||
void updateCellResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot);
|
||||
void updateCellEdgeResultColor(size_t timeStepIndex, RimResultSlot* cellResultSlot,
|
||||
RimCellEdgeResultSlot* cellEdgeResultSlot);
|
||||
|
@ -98,7 +98,7 @@ void RivReservoirPartMgr::updateCellColor(cvf::Color4f color)
|
||||
|
||||
if (m_faultsPartMgr.notNull())
|
||||
{
|
||||
m_faultsPartMgr->updateCellColor(color);
|
||||
m_faultsPartMgr->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ RimFaultCollection::RimFaultCollection()
|
||||
CAF_PDM_InitField(&showFaultFaces, "ShowFaultFaces", true, "Show faults faces", "", "", "");
|
||||
CAF_PDM_InitField(&showOppositeFaultFaces, "ShowOppositeFaultFaces", true, "Show opposite fault faces", "", "", "");
|
||||
CAF_PDM_InitField(&showNNCs, "ShowNNCs", false, "Show NNCs", "", "", "");
|
||||
CAF_PDM_InitField(&forceFaultColor, "ForceFaultColor", false, "Ignore results on faults", "", "", "");
|
||||
CAF_PDM_InitField(&limitFaultsToFilter, "LimitFaultsToFilter", true, "Hide fault outside filters", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&faultFaceCulling, "FaultFaceCulling", caf::AppEnum<RimFaultCollection::FaultFaceCullingMode>(RimFaultCollection::FAULT_FRONT_FACE_CULLING), "Face culling", "", "", "");
|
||||
@ -109,11 +110,6 @@ void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
m_reservoirView->scheduleReservoirGridGeometryRegen();
|
||||
}
|
||||
|
||||
if (&faultFaceCulling == changedField)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (&showGeometryDetectedFaults == changedField ||
|
||||
&showFaultFaces == changedField ||
|
||||
&showOppositeFaultFaces == changedField ||
|
||||
@ -122,7 +118,8 @@ void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
||||
&showFaultLabel == changedField ||
|
||||
&limitFaultsToFilter == changedField ||
|
||||
&faultLabelColor == changedField ||
|
||||
&faultFaceCulling == changedField
|
||||
&faultFaceCulling == changedField ||
|
||||
&forceFaultColor == changedField
|
||||
)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
|
@ -62,6 +62,7 @@ public:
|
||||
caf::PdmField<bool> showOppositeFaultFaces;
|
||||
caf::PdmField<bool> limitFaultsToFilter;
|
||||
caf::PdmField<bool> showNNCs;
|
||||
caf::PdmField<bool> forceFaultColor;
|
||||
|
||||
caf::PdmField<caf::AppEnum< FaultFaceCullingMode > > faultFaceCulling;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user