diff options
author | Arno <am@disconnect.de> | 2013-04-07 08:48:49 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-04-07 08:48:49 +0200 |
commit | 69791ade746638180a959c190fa5db6519c83a38 (patch) | |
tree | 02a5dd5d85b7bb3429ec318370f1f898fa1aaaa3 /filestreemodel.cpp | |
parent | 466a1fd7de9cfe5e90d812e7370ef2d22c68f00e (diff) | |
download | SheMov-69791ade746638180a959c190fa5db6519c83a38.tar.gz SheMov-69791ade746638180a959c190fa5db6519c83a38.tar.bz2 SheMov-69791ade746638180a959c190fa5db6519c83a38.zip |
Bugfix when setting DVD number
Don't call refresh on model after setting the dvd no for an index. Then
the selection is lost and the other selected indexes won't be updated.
Call refresh from the view after updating all indexes instead.
Diffstat (limited to 'filestreemodel.cpp')
-rw-r--r-- | filestreemodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/filestreemodel.cpp b/filestreemodel.cpp index b841e8a..f7763e4 100644 --- a/filestreemodel.cpp +++ b/filestreemodel.cpp @@ -257,7 +257,7 @@ bool FilesTreeModel::setData(const QModelIndex &index, const QVariant &value, in mUpdateDvdQuery->bindValue(":id", index.data(FilesIdRole)); mUpdateDvdQuery->bindValue(":dvd", value); if(mUpdateDvdQuery->exec()){ - refresh(); + item->setData(DvdNo, value); return true; }else{ return false; |