diff options
Diffstat (limited to 'src/core/model')
-rw-r--r-- | src/core/model/Domain.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/model/Domain.cpp b/src/core/model/Domain.cpp index f6c3956..ca8f889 100644 --- a/src/core/model/Domain.cpp +++ b/src/core/model/Domain.cpp @@ -566,7 +566,7 @@ bool Descriptor::addAndSortFieldDescriptor(Handle<FieldDescriptor> fd, if (fds.find(fd) == fds.end()) { invalidate(); // check if the previous field is a tree field already. - if (!fds.empty() && + if (!fds.empty() && !fieldDescriptors.empty() && fds.back()->getFieldType() == FieldDescriptor::FieldType::TREE && fd->getFieldType() != FieldDescriptor::FieldType::TREE) { // if so we add the new field before the TREE field. @@ -961,4 +961,4 @@ const Rtti Domain = RttiBuilder<ousia::Domain>("Domain") .parent(&RootNode) .composedOf({&StructuredClass, &AnnotationClass}); } -}
\ No newline at end of file +} |