Range/Property/Well Toggle fixes

* Well cells are now toggled along with pipe geometry by the Well toggle in the tree view.
* TP# 4156 Range filter collection toggle does not work
This last one was really a huge error on several places in the overall logig of what is shown when.
p4#: 22337
This commit is contained in:
Jacob Støren
2013-09-06 15:45:21 +02:00
parent 6c7c11ab6b
commit b0b24edeb9
5 changed files with 121 additions and 24 deletions

View File

@@ -43,6 +43,8 @@ RimWell::RimWell()
CAF_PDM_InitObject("Well", ":/Well.png", "", "");
CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", "");
CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", "");
showWell.setUiHidden(true);
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
@@ -96,6 +98,14 @@ void RimWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
m_reservoirView->createDisplayModelAndRedraw();
}
}
else if (&showWell == changedField)
{
if (m_reservoirView)
{
m_reservoirView->scheduleGeometryRegen(RivReservoirViewPartMgr::VISIBLE_WELL_CELLS);
m_reservoirView->createDisplayModelAndRedraw();
}
}
else if (&showWellCells == changedField)
{
if (m_reservoirView)
@@ -137,7 +147,7 @@ void RimWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWell::objectToggleField()
{
return &showWellPipes;
return &showWell;
}
//--------------------------------------------------------------------------------------------------
@@ -168,6 +178,9 @@ bool RimWell::calculateWellPipeVisibility(size_t frameIndex)
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_OFF)
return false;
if ( this->showWell() == false )
return false;
if ( this->showWellPipes() == false )
return false;