summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/ui.py b/src/ui.py
index cc2aa0a..d2ac143 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -178,21 +178,21 @@ class KPObjectSelector(QtGui.QWidget):
def currentChanged(self, current, previous):
"""Throws a signal emitting the current object when changed"""
i = current.row()
- object = self.model.groupItem().getItem(i)
+ object, depth = self.model.groupItem().getItem(i)
- self.objChanged.emit(object)
+ self.objChanged.emit(i, object)
def handleObjReplace(self, index):
"""Throws a signal when the selected object is used as a replacement"""
if QtGui.QApplication.keyboardModifiers() == QtCore.Qt.AltModifier:
i = current.row()
- object = self.model.groupItem().getItem(i)
+ object, depth = self.model.groupItem().getItem(i)
- self.objReplaced.emit(object)
+ self.objReplaced.emit(i, object)
- objChanged = QtCore.pyqtSignal(int)
- objReplaced = QtCore.pyqtSignal(KPTileObject)
+ objChanged = QtCore.pyqtSignal(int, KPTileObject)
+ objReplaced = QtCore.pyqtSignal(int, KPTileObject)
@@ -205,11 +205,10 @@ class KPMainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
- self.editor = KPEditorWidget()
- self.setCentralWidget(self.editor)
-
self.scene = KPMapScene()
- self.editor.setScene(self.scene)
+
+ self.editor = KPEditorWidget(self.scene)
+ self.setCentralWidget(self.editor)
self.setupMenuBar()