diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -56,7 +56,13 @@ class KPLayerList(QtGui.QWidget): def addLayer(self): - KP.map.appendLayer(KP.map.createNewLayer()) + from dialogs import KPTilesetChooserDialog + + tilesetName = KPTilesetChooserDialog.run('Choose a tileset for the new layer') + if tilesetName is None: + return + + KP.map.appendLayer(KP.map.createNewLayer(tilesetName)) self.setButtonStates() def removeLayer(self): @@ -69,6 +75,7 @@ class KPLayerList(QtGui.QWidget): scene.removeItem(item) KP.map.removeLayer(self.selectedLayer()) + self.setButtonStates() def moveUp(self): index = self.selectedLayerIndex() |