diff options
author | Arno <am@disconnect.de> | 2011-06-12 14:43:29 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2011-06-12 14:43:29 +0200 |
commit | a06a6425d0ebd982a4fa34502dbb20b06806af49 (patch) | |
tree | 80684c01adad0c3ccfe902f636be82d5969e61a5 | |
parent | 895a5f5dae68fbcbf45ae7e073281f9bbd09931f (diff) | |
download | SheMov-a06a6425d0ebd982a4fa34502dbb20b06806af49.tar.gz SheMov-a06a6425d0ebd982a4fa34502dbb20b06806af49.tar.bz2 SheMov-a06a6425d0ebd982a4fa34502dbb20b06806af49.zip |
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.
-rw-r--r-- | seriestreemodel.cpp | 8 |
1 files 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; } |