mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Changed container from PdmChildArrayField to std::vector
This commit is contained in:
parent
92f0d64eaf
commit
31b3e506e9
@ -969,7 +969,7 @@ bool RimUiTreeModelPdm::dropMimeData(const QMimeData *data, Qt::DropAction actio
|
||||
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(mi);
|
||||
caf::PdmObjectHandle* pdmObj = currentItem->dataObject().p();
|
||||
|
||||
pog.objects().push_back(pdmObj);
|
||||
pog.objects.push_back(pdmObj);
|
||||
}
|
||||
|
||||
if (action == Qt::CopyAction)
|
||||
|
@ -1070,7 +1070,7 @@ void RimUiTreeView::slotPastePdmObjects()
|
||||
{
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
createPdmObjectsFromClipboard(&objectGroup);
|
||||
if (objectGroup.objects().size() == 0) return;
|
||||
if (objectGroup.objects.size() == 0) return;
|
||||
|
||||
myModel->addObjects(currentIndex(), objectGroup);
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ bool RimUiTreeView::userConfirmedGridCaseGroupChange(const QModelIndexList& item
|
||||
{
|
||||
if (hasAnyStatisticsResults(gridCaseGroup))
|
||||
{
|
||||
if (pog.objects().count(gridCaseGroup) == 0)
|
||||
if (std::find(pog.objects.begin(), pog.objects.end(), gridCaseGroup) == pog.objects.end())
|
||||
{
|
||||
pog.addObject(gridCaseGroup);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ CAF_PDM_SOURCE_INIT(PdmObjectGroup, "PdmObjectGroup");
|
||||
PdmObjectGroup::PdmObjectGroup()
|
||||
{
|
||||
CAF_PDM_InitObject("Object Group", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&objects, "PdmObjects", "Children","", "", "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -36,15 +35,6 @@ void PdmObjectGroup::deleteObjects()
|
||||
{
|
||||
delete objects[it];
|
||||
}
|
||||
removeNullPtrs();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmObjectGroup::removeNullPtrs()
|
||||
{
|
||||
objects.removeChildObject(NULL);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -28,10 +28,9 @@ public:
|
||||
PdmObjectGroup();
|
||||
~PdmObjectGroup();
|
||||
|
||||
PdmChildArrayField<PdmObjectHandle*> objects;
|
||||
std::vector<PdmObjectHandle*> objects;
|
||||
|
||||
void deleteObjects();
|
||||
void removeNullPtrs();
|
||||
void addObject(PdmObjectHandle * obj);
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user