mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3558 Grid items in Project Tree : Mark show main grid as obsolete, and propagate setting to RimGridCollection
This commit is contained in:
@@ -145,6 +145,10 @@ RimEclipseView::RimEclipseView()
|
||||
m_propertyFilterCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
// Visualization fields
|
||||
CAF_PDM_InitField(&m_showMainGrid_OBSOLETE, "ShowMainGrid", true, "Show Main Grid", "", "", "");
|
||||
m_showMainGrid_OBSOLETE.uiCapability()->setUiHidden(true);
|
||||
m_showMainGrid_OBSOLETE.xmlCapability()->setIOWritable(false);
|
||||
|
||||
CAF_PDM_InitField(&m_showInactiveCells, "ShowInactiveCells", false, "Show Inactive Cells", "", "", "");
|
||||
CAF_PDM_InitField(&m_showInvalidCells, "ShowInvalidCells", false, "Show Invalid Cells", "", "", "");
|
||||
|
||||
@@ -851,6 +855,11 @@ void RimEclipseView::initAfterRead()
|
||||
this->cellResult()->setReservoirView(this);
|
||||
this->cellEdgeResult()->setReservoirView(this);
|
||||
|
||||
if (!m_showMainGrid_OBSOLETE())
|
||||
{
|
||||
gridCollection()->setMainGridActive(false);
|
||||
}
|
||||
|
||||
this->updateUiIconFromToggleField();
|
||||
}
|
||||
|
||||
|
||||
@@ -181,6 +181,7 @@ private:
|
||||
private:
|
||||
caf::PdmField<bool> m_showInvalidCells;
|
||||
caf::PdmField<bool> m_showInactiveCells;
|
||||
caf::PdmField<bool> m_showMainGrid_OBSOLETE;
|
||||
|
||||
caf::PdmChildField<RimEclipseCellColors*> m_cellResult;
|
||||
caf::PdmChildField<RimCellEdgeColors*> m_cellEdgeResult;
|
||||
|
||||
@@ -82,6 +82,14 @@ void RimGridInfo::setIndex(int index)
|
||||
m_gridIndex = index;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridInfo::setActive(bool active)
|
||||
{
|
||||
m_isActive = active;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -399,6 +407,14 @@ void RimGridCollection::syncFromMainGrid()
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCollection::setMainGridActive(bool active)
|
||||
{
|
||||
m_mainGrid()->setActive(active);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
|
||||
void setName(const QString& name);
|
||||
void setIndex(int index);
|
||||
void setActive(bool active);
|
||||
bool isActive() const;
|
||||
QString name() const;
|
||||
int index() const;
|
||||
@@ -102,6 +103,8 @@ public:
|
||||
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
void syncFromMainGrid();
|
||||
void setMainGridActive(bool active);
|
||||
|
||||
static const QString persistentGridUiName();
|
||||
static const QString temporaryGridUiName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user