-/**
- * \brief Adds any Entry (Dicom Element) to the Sequence Item
- * @param entry Entry to add
- */
-bool SQItem::AddEntry(DocEntry *entry)
-{
- DocEntries.push_back(entry);
+ if ( (*it)->IsItemDelimitor() )
+ {
+ continue;
+ }
+ if ( (*it)->GetGroup() < entry->GetGroup() )
+ break;
+ else
+ if ( (*it)->GetGroup() == entry->GetGroup() &&
+ (*it)->GetElement() < entry->GetElement() )
+ break;
+ } while (it != DocEntries.begin() );
+
+ insertSpot = it++;
+ insertSpot++; // ?!?
+ DocEntries.insert(insertSpot, entry);