Replaced use of capability template with convenience

This commit is contained in:
Jacob Støren 2015-08-20 15:24:49 +02:00
parent 0ac86aeff3
commit f174615098
5 changed files with 9 additions and 9 deletions

View File

@ -72,7 +72,7 @@ void RicDeleteItemExec::redo()
delete obj;
caf::PdmObjectHandle* parentObj = listField->ownerObject();
parentObj->capability<caf::PdmUiObjectHandle>()->updateConnectedEditors();
parentObj->uiCapability()->updateConnectedEditors();
RimView* view = NULL;
parentObj->firstAnchestorOrThisOfType(view);
@ -127,7 +127,7 @@ void RicDeleteItemExec::undo()
PdmDocument::initAfterReadTraversal(obj);
listField->uiCapability()->updateConnectedEditors();
listField->ownerObject()->capability<caf::PdmUiObjectHandle>()->updateConnectedEditors();
listField->ownerObject()->uiCapability()->updateConnectedEditors();
if (m_notificationCenter) m_notificationCenter->notifyObservers();
}

View File

@ -59,7 +59,7 @@ void RicWellPathsDeleteAllFeature::onActionTriggered(bool isChecked)
wellPathCollection->wellPaths.deleteAllChildObjects();
wellPathCollection->capability<caf::PdmUiObjectHandle>()->updateConnectedEditors();
wellPathCollection->uiCapability()->updateConnectedEditors();
wellPathCollection->scheduleGeometryRegenAndRedrawViews();
}

View File

@ -59,12 +59,12 @@ RimIdenticalGridCaseGroup::RimIdenticalGridCaseGroup()
caseCollection.uiCapability()->setUiHidden(true);
caseCollection = new RimCaseCollection;
caseCollection->capability<caf::PdmUiObjectHandle>()->setUiName("Source Cases");
caseCollection->capability<caf::PdmUiObjectHandle>()->setUiIcon(QIcon(":/Cases16x16.png"));
caseCollection->uiCapability()->setUiName("Source Cases");
caseCollection->uiCapability()->setUiIcon(QIcon(":/Cases16x16.png"));
statisticsCaseCollection = new RimCaseCollection;
statisticsCaseCollection->capability<caf::PdmUiObjectHandle>()->setUiName("Derived Statistics");
statisticsCaseCollection->capability<caf::PdmUiObjectHandle>()->setUiIcon(QIcon(":/Histograms16x16.png"));
statisticsCaseCollection->uiCapability()->setUiName("Derived Statistics");
statisticsCaseCollection->uiCapability()->setUiIcon(QIcon(":/Histograms16x16.png"));
m_mainGrid = NULL;

View File

@ -245,7 +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();
(*it)->uiCapability()->updateConnectedEditors();
}
clearClipboard();

View File

@ -62,7 +62,7 @@ QString CmdAddItemExec::name()
PdmChildArrayFieldHandle* listField = dynamic_cast<PdmChildArrayFieldHandle*>(field);
if (listField)
{
PdmXmlFieldHandle* xfh = listField->capability<PdmXmlFieldHandle>();
PdmXmlFieldHandle* xfh = listField->xmlCapability();
containedObjectType = xfh->childClassKeyword();
}