Mercurial > hg > svcore
diff data/model/NoteModel.h @ 1649:1cc9a0d4b1b6 single-point
Update RegionModel following NoteModel, er, model. They have quite a bit in common that we should now pull out some of
author | Chris Cannam |
---|---|
date | Fri, 15 Mar 2019 14:23:50 +0000 |
parents | 86bbccb79c9b |
children | 7a56bb85030f |
line wrap: on
line diff
--- a/data/model/NoteModel.h Fri Mar 15 10:57:35 2019 +0000 +++ b/data/model/NoteModel.h Fri Mar 15 14:23:50 2019 +0000 @@ -307,8 +307,8 @@ } } - Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override - { + Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override { + if (row < 0 || row >= m_events.count()) return nullptr; if (role != Qt::EditRole) return nullptr;