append/remove fields now preserves ID

This commit is contained in:
Matej Sekoranja
2012-08-20 09:22:27 +02:00
parent 156a05079e
commit 05be6e6729
2 changed files with 3 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ void PVStructure::removePVField(String fieldName)
}
PVFieldPtrArray * xxx = const_cast<PVFieldPtrArray *>(&pvFields);
xxx->swap(newPVFields);
FieldConstPtr field = getFieldCreate()->createStructure(newFieldNames,fields);
FieldConstPtr field = getFieldCreate()->createStructure(structurePtr->getID(),newFieldNames,fields);
replaceField(field);
structurePtr = static_pointer_cast<const Structure>(field);
StringArray fieldNames = structurePtr->getFieldNames();