EntityListProxy will now dirty its chunk on changes/inserts/removes
This commit is contained in:
parent
6fe1d4b9aa
commit
d05a5e3509
@ -66,18 +66,22 @@ class EntityListProxy(collections.MutableSequence):
|
|||||||
tagList[key] = [v.rootTag for v in value]
|
tagList[key] = [v.rootTag for v in value]
|
||||||
else:
|
else:
|
||||||
tagList[key] = value.rootTag
|
tagList[key] = value.rootTag
|
||||||
|
self.chunk.dirty = True
|
||||||
|
|
||||||
def __delitem__(self, key):
|
def __delitem__(self, key):
|
||||||
del getattr(self.chunk.chunkData, self.attrName)[key]
|
del getattr(self.chunk.chunkData, self.attrName)[key]
|
||||||
|
self.chunk.dirty = True
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
return len(getattr(self.chunk.chunkData, self.attrName))
|
return len(getattr(self.chunk.chunkData, self.attrName))
|
||||||
|
|
||||||
def insert(self, index, value):
|
def insert(self, index, value):
|
||||||
getattr(self.chunk.chunkData, self.attrName).insert(index, value.rootTag)
|
getattr(self.chunk.chunkData, self.attrName).insert(index, value.rootTag)
|
||||||
|
self.chunk.dirty = True
|
||||||
|
|
||||||
def remove(self, value):
|
def remove(self, value):
|
||||||
getattr(self.chunk.chunkData, self.attrName).remove(value.rootTag)
|
getattr(self.chunk.chunkData, self.attrName).remove(value.rootTag)
|
||||||
|
self.chunk.dirty = True
|
||||||
|
|
||||||
class WorldEditorChunk(object):
|
class WorldEditorChunk(object):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user