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:
@@ -37,8 +37,8 @@ template<>
|
||||
void caf::AppEnum< RimCrossSection::CrossSectionEnum >::setUp()
|
||||
{
|
||||
addItem(RimCrossSection::CS_WELL_PATH, "CS_WELL_PATH", "Well Path");
|
||||
addItem(RimCrossSection::CS_SIMULATION_WELL, "CS_SIMULATION_WELL", "Simulation Well");
|
||||
addItem(RimCrossSection::CS_USER_DEFINED, "CS_USER_DEFINED", "User defined");
|
||||
// addItem(RimCrossSection::CS_SIMULATION_WELL, "CS_SIMULATION_WELL", "Simulation Well");
|
||||
// addItem(RimCrossSection::CS_USER_DEFINED, "CS_USER_DEFINED", "User defined");
|
||||
setDefault(RimCrossSection::CS_WELL_PATH);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,12 @@ RimCrossSection::RimCrossSection()
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &isActive ||
|
||||
changedField == &type ||
|
||||
changedField == &direction ||
|
||||
changedField == &wellPath ||
|
||||
changedField == &simulationWell)
|
||||
{
|
||||
m_crossSectionPartMgr = NULL;
|
||||
|
||||
@@ -88,6 +94,7 @@ void RimCrossSection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -104,11 +111,11 @@ void RimCrossSection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
}
|
||||
else if (type == CS_SIMULATION_WELL)
|
||||
{
|
||||
uiOrdering.add(&simulationWell);
|
||||
//uiOrdering.add(&simulationWell);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// User defined poly line
|
||||
}
|
||||
|
||||
uiOrdering.setForgetRemainingFields(true);
|
||||
|
||||
@@ -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