diff options
author | Treeki <treeki@gmail.com> | 2011-11-11 15:51:33 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2011-11-11 15:51:33 +0100 |
commit | e8fecb825f98cb8167ca2f803c5e720beca940c6 (patch) | |
tree | 7980e33665e6ca677ad5e768a4efafe225d92d7c /src | |
parent | 1b72bafda7b06ab4c0e2679819655d388097000e (diff) | |
download | koopatlas-e8fecb825f98cb8167ca2f803c5e720beca940c6.tar.gz koopatlas-e8fecb825f98cb8167ca2f803c5e720beca940c6.zip |
fixed/improved KPObjectSelector signals
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() |