diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-07-23 13:29:54 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-07-23 13:29:54 -0500 |
commit | 1498632b8bc91d0f83dcbfbdd03fa7499ef0985e (patch) | |
tree | bc43b079e61da3c617a103564e6e422f7933bcbb /src/editorui/editormain.py | |
parent | e3bbfbabe74bb525adcf16b784338c4cf4e7507c (diff) | |
download | koopatlas-1498632b8bc91d0f83dcbfbdd03fa7499ef0985e.tar.gz koopatlas-1498632b8bc91d0f83dcbfbdd03fa7499ef0985e.zip |
Streamlined node drawing with auto-tilesets (bypass with Alt-click), double click a node layer to jump to it, selecting a path/node layer makes it visibly red (except level nodes)
Diffstat (limited to '')
-rw-r--r-- | src/editorui/editormain.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py index 4b2e686..11df8dd 100644 --- a/src/editorui/editormain.py +++ b/src/editorui/editormain.py @@ -506,6 +506,11 @@ class KPEditorWidget(QtGui.QGraphicsView): x, y = clicked.x(), clicked.y() itemsUnder = self.scene().items(clicked) + if event.modifiers() & Qt.AltModifier: + dialog = True + else: + dialog = False + for item in itemsUnder: if isinstance(item, KPEditorNode): # Paint a path to this node (if one is selected) @@ -541,7 +546,7 @@ class KPEditorWidget(QtGui.QGraphicsView): path = KPPath(sourceNode, destNode) KP.map.pathLayer.paths.append(path) - KP.mainWindow.pathNodeList.addLayer(path) + KP.mainWindow.pathNodeList.addLayer(path, dialog) item = KPEditorPath(path) self.scene().addItem(item) @@ -556,7 +561,7 @@ class KPEditorWidget(QtGui.QGraphicsView): node = KPNode() node.position = (x - 12, y - 12) KP.map.pathLayer.nodes.append(node) - KP.mainWindow.pathNodeList.addLayer(node) + KP.mainWindow.pathNodeList.addLayer(node, dialog) # Start node => Original path => New node => New path => End node @@ -577,7 +582,7 @@ class KPEditorWidget(QtGui.QGraphicsView): newPath = KPPath(node, endNode, origPath) KP.map.pathLayer.paths.append(newPath) - KP.mainWindow.pathNodeList.addLayer(newPath) + KP.mainWindow.pathNodeList.addLayer(newPath, dialog) pathItem = KPEditorPath(newPath) self.scene().addItem(pathItem) @@ -588,7 +593,7 @@ class KPEditorWidget(QtGui.QGraphicsView): node = KPNode() node.position = (x - 12, y - 12) KP.map.pathLayer.nodes.append(node) - KP.mainWindow.pathNodeList.addLayer(node) + KP.mainWindow.pathNodeList.addLayer(node, dialog) item = KPEditorNode(node) self.scene().addItem(item) @@ -614,7 +619,7 @@ class KPEditorWidget(QtGui.QGraphicsView): path = KPPath(sourceNode, node) KP.map.pathLayer.paths.append(path) - KP.mainWindow.pathNodeList.addLayer(path) + KP.mainWindow.pathNodeList.addLayer(path, dialog) pathItem = KPEditorPath(path) self.scene().addItem(pathItem) |