diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui.py | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -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() |