mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Caf:PdmUiTree: Rewrote rebuildUiSubTree to become updateUiSubTree
Now the UI state is preserved when refreshing the tree, making it suitable to use this method more extensively. This paves the way to make changes to the Pdm data structure without considering the ui at all, until a call to updateUiSubTree gets the ui gracefully into sync. p4#: 21599
This commit is contained in:
@@ -102,7 +102,7 @@ void RimResultSlot::changeLegendConfig(QString resultVarNameOfNewLegend)
|
||||
m_legendConfigData.v().erase(it);
|
||||
m_legendConfigData.v().push_back(this->legendConfig());
|
||||
this->legendConfig = newLegend;
|
||||
RiuMainWindow::instance()->uiPdmModel()->rebuildUiSubTree(this);
|
||||
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(this);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ void RimResultSlot::changeLegendConfig(QString resultVarNameOfNewLegend)
|
||||
newLegend->resultVariableName = resultVarNameOfNewLegend;
|
||||
m_legendConfigData.v().push_back(this->legendConfig());
|
||||
this->legendConfig = newLegend;
|
||||
RiuMainWindow::instance()->uiPdmModel()->rebuildUiSubTree(this);
|
||||
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ void RimScriptCollection::fieldChangedByUi(const caf::PdmFieldHandle *changedFie
|
||||
this->setUiName(fi.baseName());
|
||||
this->readContentFromDisc();
|
||||
RimUiTreeModelPdm* treeModel = RiuMainWindow::instance()->uiPdmModel();
|
||||
if (treeModel) treeModel->rebuildUiSubTree(this);
|
||||
if (treeModel) treeModel->updateUiSubTree(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ void RimStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collection<RigSi
|
||||
reservoirView->wellCollection()->wells.deleteAllChildObjects();
|
||||
reservoirView->updateDisplayModelForWellResults();
|
||||
|
||||
treeModel->rebuildUiSubTree(reservoirView->wellCollection());
|
||||
treeModel->updateUiSubTree(reservoirView->wellCollection());
|
||||
|
||||
progInfo.incrementProgress();
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ void RimUiTreeModelPdm::slotRefreshScriptTree(QString path)
|
||||
if (changedSColl)
|
||||
{
|
||||
changedSColl->readContentFromDisc();
|
||||
this->rebuildUiSubTree(changedSColl);
|
||||
this->updateUiSubTree(changedSColl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ void RimUiTreeModelPdm::addInputProperty(const QModelIndex& itemIndex, const QSt
|
||||
inputReservoir->openDataFileSet(fileNames);
|
||||
}
|
||||
|
||||
this->rebuildUiSubTree(inputPropertyCollection);
|
||||
this->updateUiSubTree(inputPropertyCollection);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user