Revert "added changed reference tracking for cells"

This reverts commit f4334da42e.
deque
Marc Zinnschlag 11 years ago
parent 5313862a46
commit c4e7386770

@ -1,7 +1,7 @@
#ifndef CSM_WOLRD_CELL_H
#define CSM_WOLRD_CELL_H
#include <set>
#include <vector>
#include <string>
#include <components/esm/loadcell.hpp>
@ -16,11 +16,8 @@ namespace CSMWorld
{
std::string mId;
/// These are the references modified by the edited content file. These are stored in
/// mModified only.
std::set<std::string> mTouchedRefs;
void load (ESM::ESMReader &esm);
};
}

@ -10,7 +10,6 @@
#include "columnbase.hpp"
#include "columns.hpp"
#include "info.hpp"
#include "cell.hpp"
namespace CSMWorld
{
@ -88,45 +87,6 @@ namespace CSMWorld
}
};
/// \brief Specialisation that takes care of the modified reference tracking
template<>
struct RecordStateColumn<Cell> : public Column<Cell>
{
RecordStateColumn<Cell>()
: Column<Cell> (Columns::ColumnId_Modification, ColumnBase::Display_RecordState)
{}
virtual QVariant get (const Record<Cell>& record) const
{
if (record.mState==Record<Cell>::State_Erased)
return static_cast<int> (Record<Cell>::State_Deleted);
if (!record.mModified.mTouchedRefs.empty() &&
!record.mState==Record<Cell>::State_Deleted &&
!record.mState==Record<Cell>::State_ModifiedOnly)
{
static_cast<int> (Record<Cell>::State_Modified);
}
return static_cast<int> (record.mState);
}
virtual void set (Record<Cell>& record, const QVariant& data)
{
record.mState = static_cast<RecordBase::State> (data.toInt());
}
virtual bool isEditable() const
{
return true;
}
virtual bool isUserEditable() const
{
return false;
}
};
template<typename ESXRecordT>
struct FixedRecordTypeColumn : public Column<ESXRecordT>
{

@ -53,8 +53,6 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
}
else
{
cell.mModified.mTouchedRefs.insert (Misc::StringUtils::lowerCase (
mCells.getId (cellIndex)));
record.mState = RecordBase::State_Deleted;
setRecord (index, record);
}
@ -62,10 +60,6 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
continue;
}
if (!base)
cell.mModified.mTouchedRefs.insert (Misc::StringUtils::lowerCase (
mCells.getId (cellIndex)));
if (iter==cache.end())
{
// new reference

Loading…
Cancel
Save