QByteArray edited_id = model->data(model->index(index.row(), EV_ID)).toByteArray();
if(index.column() == EV_STATUS) {
// Toggle activated state
- const bool new_status = !index.data().toBool();
- model->setData(index, new_status);
+ const bool new_status = !index.data(Qt::UserRole).toBool();
+ model->setData(index, new_status, Qt::UserRole);
// Alter Alarmd events
if(new_status) {
// Was activated