Commit 14fb49a5 authored by Jérome Perrin's avatar Jérome Perrin

When the cell range changes, MatrixBox.renameCellRange tries to keep existing

cells, by just change their ids.
When this happens, the cell id changes, the cell is removed (then unindexed), and added
again with its new id (then reindexed). The bug here is that the cell was
unindexed with its new id, and indexing messages were not flushed, because the
path was not the same.
The fix is to delete the cell before changing its id.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26610 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d17721d
......@@ -430,10 +430,10 @@ class XMLMatrix(Folder):
cell = self.get(old_id)
if cell is not None:
new_id = old_id + appended_id
self._delObject(old_id)
cell.isIndexable = 0
cell.id = new_id
self._setObject(new_id, aq_base(cell))
self._delObject(old_id)
cell.isIndexable = 1
cell.reindexObject()
#cell.unindexObject(path='%s/%s' % (self.getUrl(), old_id))
......@@ -444,10 +444,10 @@ class XMLMatrix(Folder):
cell = self.get(old_id)
if cell is not None:
new_id = old_id[:-removed_id_len]
self._delObject(old_id)
cell.isIndexable = 0
cell.id = new_id
self._setObject(new_id, aq_base(cell))
self._delObject(old_id)
cell.isIndexable = 1
cell.reindexObject()
#cell.unindexObject(path='%s/%s' % (self.getUrl(), old_id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment