contentstorage/caclient/src/caitemmodel.cpp
changeset 127 7b66bc3c6dc9
parent 125 26079c1bb561
--- a/contentstorage/caclient/src/caitemmodel.cpp	Wed Oct 13 12:59:22 2010 +0300
+++ b/contentstorage/caclient/src/caitemmodel.cpp	Mon Oct 18 10:44:15 2010 +0300
@@ -774,12 +774,14 @@
     } else if (mParentEntry && id == mParentEntry->id()) {
         updateParentEntry();
         m_q->reset();
-    } else if (ids.indexOf(id) < 0) {
-        removeItem(id);
-    } else if (mEntries.indexOf(id) < 0) {
-        addItem(id);
-    } else {
-        updateModel();
+    } else  {
+        QList<int> parentIds = entry.data()->parentIds();
+        for (int i(0); i < parentIds.count();  ++i) {
+            if (mEntries.indexOf(parentIds[i]) >= 0) {
+                emit m_q->dataChanged(
+                    index(mEntries.indexOf(parentIds[i])), index(mEntries.indexOf(parentIds[i])));            
+            }
+        } 
     }
     CACLIENTTEST_FUNC_EXIT("CaItemModelPrivate::updateItemData");
 }