From e5d1d12873748e500210a6feebf108ef501134e2 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 1 Jan 2012 23:33:25 +0100 Subject: fixed a plethora of bugs --- src/editorui/doodads.py | 6 +++++- src/editorui/editormain.py | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/editorui') diff --git a/src/editorui/doodads.py b/src/editorui/doodads.py index 7b9e222..b916b27 100644 --- a/src/editorui/doodads.py +++ b/src/editorui/doodads.py @@ -337,6 +337,7 @@ class KPEditorDoodad(KPEditorItem): self._updatePixmap() self._updatePosition() self._updateSize() + self._updateTransform() self.anmButton = self.DoodadAnmButton(self._doodadRef) self.anmProxy = self.HiddenProxy(self.anmButton, self, self.boundingRect().right() - 101, self.boundingRect().bottom() - 25) @@ -565,7 +566,10 @@ class KPEditorDoodad(KPEditorItem): doodad = self._doodadRef() layer = self._layerRef() - layer.objects.remove(doodad) + if isinstance(layer, KPPathTileLayer): + layer.doodads.remove(doodad) + else: + layer.objects.remove(doodad) doodad.cleanUpAnimations() if withItem: diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py index ba75b7f..1ba06bd 100644 --- a/src/editorui/editormain.py +++ b/src/editorui/editormain.py @@ -34,6 +34,12 @@ class KPMapScene(QtGui.QGraphicsScene): for obj in layer.objects: self.addItem(KPEditorDoodad(obj, layer)) elif isinstance(layer, KPPathLayer): + for inLayer in KP.map.associateLayers: + for obj in inLayer.objects: + self.addItem(KPEditorObject(obj, inLayer)) + for obj in inLayer.doodads: + self.addItem(KPEditorDoodad(obj, inLayer)) + for node in layer.nodes: self.addItem(KPEditorNode(node)) -- cgit v1.2.3