mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 06:15:35 +00:00
skip deleled or erased records
This commit is contained in:
parent
2278eb5e91
commit
d1290ac556
1 changed files with 15 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#include "../../model/world/columnbase.hpp"
|
#include "../../model/world/columnbase.hpp"
|
||||||
#include "../../model/world/idtable.hpp"
|
#include "../../model/world/idtable.hpp"
|
||||||
#include "../../model/world/columns.hpp"
|
#include "../../model/world/columns.hpp"
|
||||||
|
#include "../../model/world/record.hpp"
|
||||||
|
|
||||||
#include "recordstatusdelegate.hpp"
|
#include "recordstatusdelegate.hpp"
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
@ -387,6 +388,13 @@ void CSVWorld::DialogueSubView::prevId()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (newRow, 1)).toInt());
|
||||||
|
if (state == CSMWorld::RecordBase::State_Deleted || state == CSMWorld::RecordBase::State_Deleted)
|
||||||
|
{
|
||||||
|
prevId();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mEditWidget->remake(newRow);
|
mEditWidget->remake(newRow);
|
||||||
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
|
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
|
||||||
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
|
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
|
||||||
|
@ -404,6 +412,13 @@ void CSVWorld::DialogueSubView::nextId()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (newRow, 1)).toInt());
|
||||||
|
if (state == CSMWorld::RecordBase::State_Deleted || state == CSMWorld::RecordBase::State_Deleted)
|
||||||
|
{
|
||||||
|
nextId();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mEditWidget->remake(newRow);
|
mEditWidget->remake(newRow);
|
||||||
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
|
setUniversalId(CSMWorld::UniversalId (static_cast<CSMWorld::UniversalId::Type> (mTable->data (mTable->index (newRow, 2)).toInt()),
|
||||||
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
|
mTable->data (mTable->index (newRow, 0)).toString().toStdString()));
|
||||||
|
|
Loading…
Reference in a new issue