From d924a6414962435a0695441216474c7d95044233 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 27 May 2011 16:25:59 +0200 Subject: Fix removal of items from FilesTreeWidget When setting the dvd no. on several items in FilesTreeWidget, QModelIndex was used in a foreach() loop. Since the loop alters the model, the subsequent operations failed or operated on the wrong Indexes. Fixed by using a QPersistenModelIndex instead. --- filestreewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filestreewidget.cpp') diff --git a/filestreewidget.cpp b/filestreewidget.cpp index 983ddeb..2aa32d2 100644 --- a/filestreewidget.cpp +++ b/filestreewidget.cpp @@ -200,7 +200,7 @@ void FilesTreeWidget::edit(int column){ if(!cols.values().contains(column)){ return; } - QModelIndexList sIdxes; + PersistenModelIndexList sIdxes; foreach(QModelIndex idx, currentSel){ QModelIndex pIdx = filesTree()->model()->index(idx.row(), column, idx.parent()); if(pIdx.isValid()){ -- cgit v1.2.3-70-g09d2