homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp
changeset 86 e4f038c420f7
parent 81 7dd137878ff8
child 97 66b5fe3c07fd
--- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp	Wed Aug 18 10:33:57 2010 +0300
+++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hsaddappstocollectionstate.cpp	Mon Sep 13 13:03:23 2010 +0300
@@ -599,10 +599,15 @@
     QStandardItemModel *model = new QStandardItemModel(this);
     QList<QStandardItem *> items;
     for (int row = 0; row < caModel->rowCount(); row++) {
+        int itemId = caModel->data(caModel->index(row, 0),
+                               CaItemModel::IdRole).toInt();
+        // do not add actual collection to model
+        if(itemId == mCollectionId)
+        	{
+            continue;
+        	}
         uint flags = caModel->data(caModel->index(row, 0),
                 CaItemModel::FlagsRole).value<EntryFlags> ();
-        int itemId = caModel->data(caModel->index(row, 0),
-                                   CaItemModel::IdRole).toInt();
         if ((flags & RemovableEntryFlag) && (itemId != collectionId)) {
             QStandardItem *standardItem = new QStandardItem();
             standardItem->setData(caModel->data(caModel->index(row, 0),