From 74851b2730e2d2d2714a8e032a9722a6f6bb23cf Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 10 Jul 2010 22:38:12 +0200 Subject: [PATCH] Fix activated status toggling --- switchingeventlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/switchingeventlist.cpp b/switchingeventlist.cpp index 8773bcb..022b7d9 100644 --- a/switchingeventlist.cpp +++ b/switchingeventlist.cpp @@ -70,8 +70,8 @@ void SwitchingEventList::editEvent(QModelIndex index) { 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 -- 1.7.9.5