Skip to content

Commit

Permalink
Fixed|libdoomsday|DED: Indexing copied model definitions
Browse files Browse the repository at this point in the history
When making a copy of an existing definition, omit the lookup
identifiers to avoid messing up the indexing in DEDRegister.

Todo: DEDRegister should provide a method for copying, to hide this
implementation detail.
  • Loading branch information
skyjake committed Jul 31, 2014
1 parent 58d3c5d commit b684a59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doomsday/libdoomsday/src/defs/dedparser.cpp
Expand Up @@ -1415,8 +1415,9 @@ DENG2_PIMPL(DEDParser)
prevModel = &ded->models[prevModelDefIdx];

// Private members are used for metadata (like __order__) that should
// not be copied.
if(bCopyNext) mdl.assign(*prevModel, Record::IgnoreDoubleUnderscoreMembers);
// not be copied. Also don't copy the identifying keys, so that
// the new ones are used for indexing.
if(bCopyNext) mdl.assign(*prevModel, QRegExp("__.*|id|state"));
}

FINDBEGIN;
Expand Down

0 comments on commit b684a59

Please sign in to comment.