From b503c9e9a29c41b4e0d5e6c43af42b6dc135b9c8 Mon Sep 17 00:00:00 2001 From: Arno Moeller Date: Thu, 17 Jun 2010 16:52:48 +0200 Subject: Bugfix in SeriesTreeModel Return false from setData if new name == old name. This made the entries disappear from tree. --- seriestreemodel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'seriestreemodel.cpp') 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 -- cgit v1.2.3-70-g09d2