diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-18 00:07:42 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-02-18 00:07:42 +0100 |
commit | a0719a9a3e1c0970c0207fa4beec150613f1a768 (patch) | |
tree | 53f707ded02b28f83352bcd077cf665590ee0205 /src/core/model/Domain.cpp | |
parent | 80e5c01f09667ebdc2ad9f950c0e83b8a0b64a41 (diff) |
Fixed bug #80 and added unit test
Diffstat (limited to 'src/core/model/Domain.cpp')
-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 +} |