summaryrefslogtreecommitdiff
path: root/src/ui.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui.py b/src/ui.py
index 58cc127..648cfa9 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -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()