mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1568 Add checkbox to well path fracture collection
This commit is contained in:
parent
7d1deb319f
commit
5f20ef1a0a
@ -101,7 +101,7 @@ RivWellPathPartMgr::~RivWellPathPartMgr()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellPathPartMgr::appendFracturePartsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform)
|
||||
{
|
||||
if (!m_rimWellPath) return;
|
||||
if (!m_rimWellPath || !m_rimWellPath->fractureCollection()->isChecked()) return;
|
||||
|
||||
for (RimWellPathFracture* f : m_rimWellPath->fractureCollection()->fractures())
|
||||
{
|
||||
|
@ -18,7 +18,9 @@
|
||||
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
@ -35,6 +37,9 @@ RimWellPathFractureCollection::RimWellPathFractureCollection(void)
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&fractures, "Fractures", "", "", "", "");
|
||||
fractures.uiCapability()->setUiHidden(true);
|
||||
|
||||
setName("Fractures");
|
||||
nameField()->uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -43,7 +48,6 @@ RimWellPathFractureCollection::RimWellPathFractureCollection(void)
|
||||
RimWellPathFractureCollection::~RimWellPathFractureCollection()
|
||||
{
|
||||
fractures.deleteAllChildObjects();
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -53,3 +57,13 @@ void RimWellPathFractureCollection::deleteFractures()
|
||||
{
|
||||
fractures.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathFractureCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
@ -28,7 +30,7 @@ class RimWellPathFracture;
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellPathFractureCollection : public caf::PdmObject
|
||||
class RimWellPathFractureCollection : public RimCheckableNamedObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@ -36,7 +38,11 @@ public:
|
||||
RimWellPathFractureCollection(void);
|
||||
virtual ~RimWellPathFractureCollection(void);
|
||||
|
||||
void deleteFractures();
|
||||
|
||||
public:
|
||||
caf::PdmChildArrayField<RimWellPathFracture*> fractures;
|
||||
|
||||
void deleteFractures();
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user