Toggle on off visibility of wells in well collection

p4#: 21419
This commit is contained in:
Magne Sjaastad
2013-04-25 09:07:29 +02:00
parent 9c8c12955b
commit 8fc9d06edb
3 changed files with 26 additions and 11 deletions

View File

@@ -91,10 +91,12 @@ void RivReservoirPipesPartMgr::setScaleTransform(cvf::Transform * scaleTransform
//--------------------------------------------------------------------------------------------------
void RivReservoirPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, size_t frameIndex)
{
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_OFF) return;
if (!m_reservoirView->wellCollection()->showWells() ) return;
if (m_reservoirView->wellCollection()->wells.size() != m_wellPipesPartMgrs.size())
{
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimWellCollection::PIPES_FORCE_ALL_OFF) return;
if (m_reservoirView->wellCollection()->wells.size() != m_wellPipesPartMgrs.size())
{
clearGeometryCache();
for (size_t i = 0; i < m_reservoirView->wellCollection()->wells.size(); ++i)
@@ -107,13 +109,13 @@ void RivReservoirPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasic
m_wellHeadPartMgrs.push_back(wellHeadMgr);
wellHeadMgr->setScaleTransform(m_scaleTransform.p());
}
}
}
for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx)
{
m_wellPipesPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
m_wellHeadPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
}
for (size_t wIdx = 0; wIdx != m_wellPipesPartMgrs.size(); ++ wIdx)
{
m_wellPipesPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
m_wellHeadPartMgrs[wIdx]->appendDynamicGeometryPartsToModel(model, frameIndex);
}
}
//--------------------------------------------------------------------------------------------------