From a06a6425d0ebd982a4fa34502dbb20b06806af49 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 12 Jun 2011 14:43:29 +0200 Subject: Bugfix in editing Series Some conditions were placed outside if(role == Qt::EditRole) in SeriesTreeModel. Because of that most of the fields for a Part couldn't be updated since the condition would never be met. --- seriestreemodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seriestreemodel.cpp b/seriestreemodel.cpp index b850b9c..2319c51 100644 --- a/seriestreemodel.cpp +++ b/seriestreemodel.cpp @@ -183,11 +183,11 @@ bool SeriesTreeModel::setData(const QModelIndex &index, const QVariant &value, i } }else if(index.column() == IsLocal){ setLocal(index, value); + }else if(index.data(TypeRole).toInt() == NewSeries){ + return setNewSeries(index, value); + }else{ + return updateGeneric(index, value); } - }else if(index.data(TypeRole).toInt() == NewSeries){ - return setNewSeries(index, value); - }else{ - return updateGeneric(index, value); } return false; } -- cgit v1.2.3-70-g09d2