mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show wells expanded
Update enabled/disabled state for fields based on check state of parent region
This commit is contained in:
parent
a3d964e4eb
commit
ee71af320f
@ -38,12 +38,12 @@ public:
|
|||||||
|
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||||
|
|
||||||
|
void updateState();
|
||||||
|
|
||||||
caf::PdmField<QString> name;
|
caf::PdmField<QString> name;
|
||||||
caf::PdmField<bool> selected;
|
caf::PdmField<bool> selected;
|
||||||
caf::PdmPointersField<RimOilFieldEntry*> fields;
|
caf::PdmPointersField<RimOilFieldEntry*> fields;
|
||||||
|
|
||||||
private:
|
|
||||||
void updateState();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -385,6 +385,13 @@ void RiuWellImportWizard::updateFieldsModel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_wellPathImportObject->updateRegions(regions, fields, edmIds);
|
m_wellPathImportObject->updateRegions(regions, fields, edmIds);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < m_wellPathImportObject->regions.size(); i++)
|
||||||
|
{
|
||||||
|
m_wellPathImportObject->regions[i]->updateState();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_wellPathImportObject->updateConnectedEditors();
|
m_wellPathImportObject->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -695,7 +702,7 @@ void RiuWellImportWizard::parseWellsResponse(RimOilFieldEntry* oilFieldEntry)
|
|||||||
|
|
||||||
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
||||||
if (wellSelectionPage)
|
if (wellSelectionPage)
|
||||||
wellSelectionPage->expandAllTreeNodes();
|
wellSelectionPage->buildWellTreeView();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -842,7 +849,7 @@ void WellSelectionPage::initializePage()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void WellSelectionPage::expandAllTreeNodes()
|
void WellSelectionPage::buildWellTreeView()
|
||||||
{
|
{
|
||||||
m_regionsWithVisibleWells->objects.clear();
|
m_regionsWithVisibleWells->objects.clear();
|
||||||
|
|
||||||
@ -857,7 +864,8 @@ void WellSelectionPage::expandAllTreeNodes()
|
|||||||
|
|
||||||
m_wellSelectionTreeView->setPdmObject(m_regionsWithVisibleWells);
|
m_wellSelectionTreeView->setPdmObject(m_regionsWithVisibleWells);
|
||||||
m_regionsWithVisibleWells->updateConnectedEditors();
|
m_regionsWithVisibleWells->updateConnectedEditors();
|
||||||
//m_wellSelectionTreeView->treeView()->expandAll();
|
|
||||||
|
m_wellSelectionTreeView->treeView()->expandAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -877,6 +885,7 @@ WellSelectionPage::~WellSelectionPage()
|
|||||||
WellSummaryPage::WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* parent /*= 0*/)
|
WellSummaryPage::WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* parent /*= 0*/)
|
||||||
{
|
{
|
||||||
m_wellPathImportObject = wellPathImport;
|
m_wellPathImportObject = wellPathImport;
|
||||||
|
m_wellPathImportObject->setUiHidden(true);
|
||||||
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout;
|
QVBoxLayout* layout = new QVBoxLayout;
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
~WellSelectionPage();
|
~WellSelectionPage();
|
||||||
|
|
||||||
virtual void initializePage();
|
virtual void initializePage();
|
||||||
void expandAllTreeNodes();
|
void buildWellTreeView();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmObjectGroup* m_regionsWithVisibleWells;
|
caf::PdmObjectGroup* m_regionsWithVisibleWells;
|
||||||
|
Loading…
Reference in New Issue
Block a user