mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#657) Hide unused enums and handle isActive for cross section collection
This commit is contained in:
@@ -78,6 +78,8 @@ void RimCrossSectionCollection::updateCellResultColor(size_t timeStepIndex, RimE
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform)
|
||||
{
|
||||
if (!isActive) return;
|
||||
|
||||
for (size_t csIdx = 0; csIdx < m_crossSections.size(); ++csIdx)
|
||||
{
|
||||
RimCrossSection* cs = m_crossSections[csIdx];
|
||||
@@ -106,3 +108,19 @@ void RimCrossSectionCollection::appendCrossSection(RimCrossSection* crossSection
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSectionCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &isActive)
|
||||
{
|
||||
RimView* rimView = NULL;
|
||||
firstAnchestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user