From 9a80e111828457af1ed93f6c7294983c4ea301b0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sun, 27 Oct 2013 14:13:10 +0100 Subject: [PATCH] reimplemented add and appendBlankRecord via insertRecord --- apps/opencs/model/world/collection.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/opencs/model/world/collection.hpp b/apps/opencs/model/world/collection.hpp index 4d93dc8810..167210de93 100644 --- a/apps/opencs/model/world/collection.hpp +++ b/apps/opencs/model/world/collection.hpp @@ -152,8 +152,7 @@ namespace CSMWorld record2.mState = Record::State_ModifiedOnly; record2.mModified = record; - mRecords.push_back (record2); - mIndex.insert (std::make_pair (Misc::StringUtils::lowerCase (id), mRecords.size()-1)); + insertRecord (record2, mRecords.size()); } else { @@ -270,7 +269,12 @@ namespace CSMWorld ESXRecordT record; IdAccessorT().getId (record) = id; record.blank(); - add (record); + + Record record2; + record2.mState = Record::State_ModifiedOnly; + record2.mModified = record; + + insertRecord (record2, mRecords.size(), type); } template