| 206 | } |
| 207 | |
| 208 | bool MarkerModel::removeRows(int row, int count, const QModelIndex &parent) |
| 209 | { |
| 210 | beginRemoveRows(parent, row, row+count-1); |
| 211 | |
| 212 | auto it = movie->editor->markers.cbegin(); |
| 213 | if (count == 1) { |
| 214 | std::advance(it, row); |
| 215 | movie->editor->markers.erase(it); |
| 216 | } |
| 217 | else { |
| 218 | movie->editor->markers.erase(std::next(it, row), std::next(it, row+count-1)); |
| 219 | } |
| 220 | endRemoveRows(); |
| 221 | return true; |
| 222 | } |
no test coverage detected