mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 12:39:53 +00:00
Small correction.
This commit is contained in:
parent
d82f272e05
commit
92ee252eef
@ -657,27 +657,6 @@ int CSMWorld::Data::count (RecordBase::State state) const
|
||||
count (state, mReferenceables);
|
||||
}
|
||||
|
||||
bool CSMWorld::Data::recordDeleted(const std::string& id) const
|
||||
{
|
||||
return
|
||||
getGlobals().getRecord(id).isDeleted() ||
|
||||
getGmsts().getRecord(id).isDeleted() ||
|
||||
getSkills().getRecord(id).isDeleted() ||
|
||||
getClasses().getRecord(id).isDeleted() ||
|
||||
getFactions().getRecord(id).isDeleted() ||
|
||||
getRaces().getRecord(id).isDeleted() ||
|
||||
getSounds().getRecord(id).isDeleted() ||
|
||||
getScripts().getRecord(id).isDeleted() ||
|
||||
getRegions().getRecord(id).isDeleted() ||
|
||||
getBirthsigns().getRecord(id).isDeleted() ||
|
||||
getSpells().getRecord(id).isDeleted() ||
|
||||
getTopics().getRecord(id).isDeleted() ||
|
||||
getJournals().getRecord(id).isDeleted() ||
|
||||
getCells().getRecord(id).isDeleted() ||
|
||||
getReferenceables().getRecord(id).isDeleted();
|
||||
}
|
||||
|
||||
|
||||
void CSMWorld::Data::setDescription (const std::string& description)
|
||||
{
|
||||
mDescription = description;
|
||||
|
@ -190,8 +190,6 @@ namespace CSMWorld
|
||||
|
||||
std::string getAuthor() const;
|
||||
|
||||
bool recordDeleted(const std::string& id) const;
|
||||
|
||||
signals:
|
||||
|
||||
void idListChanged();
|
||||
|
@ -125,13 +125,10 @@ void CSVWorld::GenericCreator::create()
|
||||
{
|
||||
if (mCloneMode)
|
||||
{
|
||||
const std::string id = getId();
|
||||
if (mData.recordDeleted(id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
std::string id = getId();
|
||||
std::auto_ptr<CSMWorld::CloneCommand> command (new CSMWorld::CloneCommand (
|
||||
dynamic_cast<CSMWorld::IdTable&> (*mData.getTableModel(mListId)), mClonedId, id, mClonedType, mArgumentType));
|
||||
|
||||
mUndoStack.push(command.release());
|
||||
|
||||
emit done();
|
||||
|
@ -308,6 +308,7 @@ void CSVWorld::Table::cloneRecord()
|
||||
if (!mEditLock)
|
||||
{
|
||||
QModelIndexList selectedRows = selectionModel()->selectedRows();
|
||||
|
||||
if (selectedRows.size()==1)
|
||||
{
|
||||
emit cloneRequest (selectedRows.begin()->row(), mModel);
|
||||
|
@ -74,7 +74,7 @@ namespace CSVWorld
|
||||
/// \param modified Number of added and modified records
|
||||
|
||||
void createRequest();
|
||||
void cloneRequest(int row, const CSMWorld::IdTable* table);
|
||||
void cloneRequest(int row, const CSMWorld::IdTable*);
|
||||
|
||||
private slots:
|
||||
|
||||
|
@ -49,7 +49,7 @@ CSVWorld::TableSubView::TableSubView (const CSMWorld::UniversalId& id, CSMDoc::D
|
||||
{
|
||||
connect (mTable, SIGNAL (createRequest()), mBottom, SLOT (createRequest()));
|
||||
|
||||
connect (mTable, SIGNAL (cloneRequest(int, CSMWorld::IdTable*)), this, SLOT(cloneRequest(int, CSMWorld::IdTable*)));
|
||||
connect (mTable, SIGNAL (cloneRequest(int, const CSMWorld::IdTable*)), this, SLOT(cloneRequest(int, const CSMWorld::IdTable*)));
|
||||
connect (this, SIGNAL(cloneRequest(const std::string&, const CSMWorld::UniversalId::Type, const CSMWorld::UniversalId::ArgumentType)),
|
||||
mBottom, SLOT(cloneRequest(const std::string&, const CSMWorld::UniversalId::Type, const CSMWorld::UniversalId::ArgumentType)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user