diff --git a/apps/opencs/model/world/commands.cpp b/apps/opencs/model/world/commands.cpp index 79900c6c4..a572ca632 100644 --- a/apps/opencs/model/world/commands.cpp +++ b/apps/opencs/model/world/commands.cpp @@ -319,6 +319,15 @@ void CSMWorld::RevertCommand::redo() } else { + // notify view that data has changed, previously only the modified column was + // updated in the view unless the user had selected another item or forced a + // repaint with other means + int count = mModel.columnCount (index.parent ()); + if (count > 0) + { + emit mModel.dataChanged(mModel.index (index.row(), 0, index.parent ()), + mModel.index (index.row(), count - 1, index.parent ())); + } mModel.setData (index, static_cast (RecordBase::State_BaseOnly)); } } diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index 3e503a80c..7492b6b17 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -86,9 +86,9 @@ bool CSMWorld::IdTable::setData (const QModelIndex &index, const QVariant &value mIdCollection->setData (index.row(), index.column(), value); emit dataChanged(index, index); - // Modifying a value can also change the Modified status of a record. + // Modifying a value can also change the Modified status of a record unless . int stateColumn = searchColumnIndex(Columns::ColumnId_Modification); - if (stateColumn != -1) + if (stateColumn != -1 && index.column() != stateColumn) { QModelIndex stateIndex = this->index(index.row(), stateColumn); emit dataChanged(stateIndex, stateIndex);