summaryrefslogtreecommitdiff
path: root/src/editorui/editormain.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/editorui/editormain.py15
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)