Code: Select all
QAbstractItemModel *model = mDocument.getData().getTableModel(CSMWorld::UniversalId::Type_Reference);
const CSMWorld::RefCollection& references = mDocument.getData().getReferences();
int columnIndexPosX = references.findColumnIndex(CSMWorld::Columns::ColumnId_PositionXPos);
mDocument.getUndoStack().push(new CSMWorld::ModifyCommand(*model,
static_cast<CSMWorld::IdTable *>(model)->getModelIndex(referenceId, columnIndexPosX),
result.second.x));
* If I have the References table open, the document seems to be locked. How do I unlock it? (actually I don't really know if it is locked, just guessing)
* Without above unlocking, how can I test to see if my code is making the correct change to the document?
* Am I meant to update each entry separately? (i.e. x, y, z) of is there a way to update all three at once?