(#354) Called updateConnectedEditors everywhere updateUiSubTree is called

This commit is contained in:
Jacob Støren 2015-08-13 21:28:09 +02:00
parent 3d47e5795b
commit 235e024533
5 changed files with 21 additions and 3 deletions

View File

@ -668,10 +668,10 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
uiModel->updateUiSubTree(analysisModels);
analysisModels->updateConnectedEditors();
RiuMainWindow::instance()->setCurrentObjectInTreeView(riv->cellResult());
analysisModels->updateConnectedEditors();
return true;
}
@ -706,6 +706,7 @@ bool RiaApplication::openInputEclipseCaseFromFileNames(const QStringList& fileNa
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
uiModel->updateUiSubTree(analysisModels);
analysisModels->updateConnectedEditors();
RiuMainWindow::instance()->setCurrentObjectInTreeView(riv->cellResult());
@ -753,6 +754,7 @@ bool RiaApplication::openOdbCaseFromFile(const QString& fileName)
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
uiModel->updateUiSubTree(m_project);
m_project->updateConnectedEditors();
RiuMainWindow::instance()->setCurrentObjectInTreeView(riv->cellResult());
@ -1327,6 +1329,7 @@ void RiaApplication::applyPreferences()
this->project()->setScriptDirectories(m_preferences->scriptDirectories());
RimUiTreeModelPdm* treeModel = RiuMainWindow::instance()->uiPdmModel();
if (treeModel) treeModel->updateUiSubTree(this->project()->scriptCollection());
this->project()->scriptCollection()->updateConnectedEditors();
}
}
@ -1783,6 +1786,7 @@ bool RiaApplication::addEclipseCases(const QStringList& fileNames)
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
uiModel->updateUiSubTree( m_project->activeOilField()->analysisModels());
m_project->activeOilField()->analysisModels()->updateConnectedEditors();
if (gridCaseGroup->statisticsCaseCollection()->reservoirs.size() > 0)
{

View File

@ -495,6 +495,7 @@ void RimEclipseStatisticsCase::setWellResultsAndUpdateViews(const cvf::Collectio
reservoirView->updateDisplayModelForWellResults();
treeModel->updateUiSubTree(reservoirView->wellCollection());
reservoirView->wellCollection()->updateConnectedEditors();
progInfo.incrementProgress();
}

View File

@ -94,6 +94,7 @@ bool RimUiTreeModelPdm::deletePropertyFilter(const QModelIndex& itemIndex)
delete propertyFilter;
// updateUiSubTree(propertyFilterCollection); // To be enabled
propertyFilterCollection->updateConnectedEditors();
if (wasFilterActive)
{
@ -136,6 +137,7 @@ bool RimUiTreeModelPdm::deleteGeoMechPropertyFilter(const QModelIndex& itemIndex
delete propertyFilter;
// updateUiSubTree(propertyFilterCollection); // To be enabled
propertyFilterCollection->updateConnectedEditors();
if (wasFilterActive)
{
@ -178,6 +180,7 @@ bool RimUiTreeModelPdm::deleteRangeFilter(const QModelIndex& itemIndex)
delete rangeFilter;
// updateUiSubTree(rangeFilterCollection); // To be enabled
rangeFilterCollection->updateConnectedEditors();
if (wasFilterActive)
{
@ -214,6 +217,7 @@ void RimUiTreeModelPdm::deleteReservoirViews(const std::vector<caf::PdmUiItem*>&
for (std::set<RimCase*>::iterator it = ownerCases.begin(); it != ownerCases.end(); ++it)
{
updateUiSubTree(*it);
(*it)->updateConnectedEditors();
}
clearClipboard();
@ -241,6 +245,7 @@ void RimUiTreeModelPdm::deleteGeoMechCases(const std::vector<caf::PdmUiItem*>& t
for (std::set<caf::PdmObjectHandle*>::iterator it = allParents.begin(); it != allParents.end(); ++it)
{
updateUiSubTree(*it);
(*it)->capability<caf::PdmUiObjectHandle>()->updateConnectedEditors();
}
clearClipboard();
@ -478,8 +483,8 @@ RimView* RimUiTreeModelPdm::addReservoirView(const std::vector<caf::PdmUiItem*>&
insertedView->loadDataAndUpdate();
if (eclipseCase ) this->updateUiSubTree(eclipseCase);
if (geomCase ) this->updateUiSubTree(geomCase);
if (eclipseCase ){ this->updateUiSubTree(eclipseCase); eclipseCase->updateConnectedEditors();}
if (geomCase ) { this->updateUiSubTree(geomCase); geomCase->updateConnectedEditors();}
return insertedView;
}
@ -519,6 +524,7 @@ void RimUiTreeModelPdm::slotRefreshScriptTree(QString path)
{
changedSColl->readContentFromDisc();
this->updateUiSubTree(changedSColl);
changedSColl->updateConnectedEditors();
}
}
@ -542,6 +548,7 @@ void RimUiTreeModelPdm::addInputProperty(const QModelIndex& itemIndex, const QSt
}
this->updateUiSubTree(inputPropertyCollection);
inputPropertyCollection->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
@ -647,6 +654,7 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(QModelIndex& inserted
analysisModels->caseGroups().push_back(createdObject);
this->updateUiSubTree(analysisModels);
analysisModels->updateConnectedEditors();
insertedModelIndex = getModelIndexFromPdmObject(createdObject);
return createdObject;
@ -835,6 +843,7 @@ void RimUiTreeModelPdm::addObjects(const QModelIndex& itemIndex, const caf::PdmO
rimReservoirView->loadDataAndUpdate();
this->updateUiSubTree(geomCase);
geomCase->updateConnectedEditors();
}
}
}

View File

@ -644,6 +644,7 @@ public:
inputRes->m_inputPropertyCollection->inputProperties.push_back(inputProperty);
RimUiTreeModelPdm* treeModel = RiuMainWindow::instance()->uiPdmModel();
treeModel->updateUiSubTree(inputRes->m_inputPropertyCollection());
inputRes->m_inputPropertyCollection()->updateConnectedEditors();
}
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED_NOT_SAVED;
}
@ -1009,6 +1010,7 @@ public:
inputRes->m_inputPropertyCollection->inputProperties.push_back(inputProperty);
RimUiTreeModelPdm* treeModel = RiuMainWindow::instance()->uiPdmModel();
treeModel->updateUiSubTree(inputRes->m_inputPropertyCollection());
inputRes->m_inputPropertyCollection()->updateConnectedEditors();
}
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED_NOT_SAVED;
}

View File

@ -1954,6 +1954,8 @@ void RiuMainWindow::setCurrentObjectInTreeView(caf::PdmObject* object)
m_OBSOLETE_treeView->setCurrentIndex(mi);
}
}
// Todo: m_projectTreeView->setCurrentItemInTreeView(object);
}
//--------------------------------------------------------------------------------------------------