SSIHUB: Added visibility checkbox next to well path collection

This commit is contained in:
Magne Sjaastad 2013-10-22 15:30:12 +02:00
parent cb19ec5524
commit 9abc3387aa
3 changed files with 16 additions and 1 deletions

View File

@ -84,6 +84,7 @@ void RivWellPathCollectionPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBa
{
setScaleTransform(scaleTransform);
if (!m_wellPathCollection->isActive()) return;
if (m_wellPathCollection->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
for (size_t wIdx = 0; wIdx < m_wellPathCollection->wellPaths.size(); wIdx++)

View File

@ -66,6 +66,9 @@ RimWellPathCollection::RimWellPathCollection()
{
CAF_PDM_InitObject("Wells", ":/WellCollection.png", "", "");
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
isActive.setUiHidden(true);
CAF_PDM_InitField(&showWellPathLabel, "ShowWellPathLabel", true, "Show well path labels", "", "", "");
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
@ -216,6 +219,14 @@ void RimWellPathCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd
advancedGroup->add(&wellPathClipZDistance);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellPathCollection::objectToggleField()
{
return &isActive;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -51,6 +51,8 @@ public:
};
typedef caf::AppEnum<RimWellPathCollection::WellVisibilityType> WellVisibilityEnum;
caf::PdmField<bool> isActive;
caf::PdmField<bool> showWellPathLabel;
caf::PdmField<cvf::Color3f> wellPathLabelColor;
@ -61,7 +63,7 @@ public:
caf::PdmField<int> wellPathClipZDistance;
caf::PdmPointersField<RimWellPath*> wellPaths;
RivWellPathCollectionPartMgr* wellPathCollectionPartMgr() { return m_wellPathCollectionPartManager.p(); }
@ -74,6 +76,7 @@ public:
private:
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
virtual caf::PdmFieldHandle* objectToggleField();
caf::PdmPointer<RimProject> m_project;
cvf::ref<RivWellPathCollectionPartMgr> m_wellPathCollectionPartManager;