diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui.py | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -49,15 +49,25 @@ class KPLayerList(QtGui.QWidget): KP.map.appendLayer(KP.map.createNewLayer()) def removeLayer(self): + layer = self.selectedLayer() + scene = KP.mainWindow.scene + + for obj in layer.objects: + item = obj.qtItem + if item: + scene.removeItem(item) + KP.map.removeLayer(self.selectedLayer()) def moveUp(self): index = self.selectedLayerIndex() KP.map.moveLayer(index, index - 1) + KP.mainWindow.editor.viewport().update() def moveDown(self): index = self.selectedLayerIndex() KP.map.moveLayer(index, index + 2) + KP.mainWindow.editor.viewport().update() @@ -256,7 +266,6 @@ class KPMainWindow(QtGui.QMainWindow): @QtCore.pyqtSlot(int, KPTileObject) def handleSelectedObjectChanged(self, index, obj): - print("New obj: %d, %r" % (index, obj)) self.editor.paintNext = obj self.editor.paintNextID = index |