diff options
-rw-r--r-- | seriestreemodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/seriestreemodel.cpp b/seriestreemodel.cpp index b657d9b..390f19c 100644 --- a/seriestreemodel.cpp +++ b/seriestreemodel.cpp @@ -108,6 +108,9 @@ bool SeriesTreeModel::setData(const QModelIndex &index, const QVariant &value, i //change of series name if(index.column() == Name){ QModelIndex newSeries = findValue(value, index.parent(), index.column()); + if(newSeries == index){ + return false; + } int oldSeriesId = index.data(SeriesIdRole).toInt(); if(newSeries != QModelIndex()){ //new series name already exists |