Use setData() instead of emtitting dataChanged() which does not work on CI. Also Fixes the remaining issue with subviews not updating due to only the modified flag emitting a change, which prevented the widget mapper from working for updates.

remotes/1728160796594174844/tmp_0.7.0-alpha
Doc West 7 years ago committed by Alexander Stillich
parent 4780f1b2bd
commit 143eadb58e

@ -323,11 +323,16 @@ void CSMWorld::RevertCommand::redo()
// 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)
for (int i=0; i<count; ++i)
{
emit mModel.dataChanged(mModel.index (index.row(), 0, index.parent ()),
mModel.index (index.row(), count - 1, index.parent ()));
if (i != index.column())
{
auto colIndex = mModel.index (index.row (), i, index.parent ());
auto data = mModel.data (colIndex);
mModel.setData (colIndex, data);
}
}
mModel.setData (index, static_cast<int> (RecordBase::State_BaseOnly));
}
}

Loading…
Cancel
Save