mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2479 2dIntersectionView. Remove 2dIntersectionViewCollection toggle in project tree
This commit is contained in:
parent
28830d3a1b
commit
15e242d1e3
@ -361,16 +361,7 @@ int Rim2dIntersectionView::timeStepCount()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim2dIntersectionView::isWindowVisible()
|
||||
{
|
||||
if (m_showWindow())
|
||||
{
|
||||
Rim2dIntersectionViewCollection* viewColl = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(viewColl);
|
||||
return viewColl->isActive();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return m_showWindow();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -31,8 +31,6 @@ Rim2dIntersectionViewCollection::Rim2dIntersectionViewCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("2D Intersection Views", ":/CrossSection16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_isActive, "IsActive", true, "Show", "","","");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_intersectionViews, "IntersectionViews", "Intersection Views", ":/CrossSection16x16.png", "", "");
|
||||
m_intersectionViews.uiCapability()->setUiTreeHidden(true);
|
||||
}
|
||||
@ -116,19 +114,3 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda
|
||||
|
||||
if (rimCase) rimCase->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim2dIntersectionViewCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_isActive)
|
||||
{
|
||||
for (auto view : m_intersectionViews)
|
||||
{
|
||||
view->updateMdiWindowVisibility();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,16 +31,11 @@ public:
|
||||
Rim2dIntersectionViewCollection();
|
||||
virtual ~Rim2dIntersectionViewCollection();
|
||||
|
||||
bool isActive() { return m_isActive();}
|
||||
void syncFromExistingIntersections( bool doUpdate );
|
||||
|
||||
std::vector<Rim2dIntersectionView*> views();
|
||||
|
||||
private:
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override { return &m_isActive; }
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
caf::PdmField<bool> m_isActive;
|
||||
caf::PdmChildArrayField<Rim2dIntersectionView*> m_intersectionViews;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user