Skip to content

Commit 209d57c

Browse files
committed
pipe default fix.
1 parent 1a7153e commit 209d57c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

NodeGraphQt/base/graph.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from NodeGraphQt.base.port import Port
1717
from NodeGraphQt.constants import (DRAG_DROP_ID,
1818
PIPE_LAYOUT_CURVED,
19-
PIPE_LAYOUT_STRAIGHT)
19+
PIPE_LAYOUT_STRAIGHT, PIPE_LAYOUT_ANGLE)
2020
from NodeGraphQt.widgets.viewer import NodeViewer
2121

2222

@@ -392,11 +392,14 @@ def set_pipe_style(self, style=None):
392392
393393
``NodeGraphQt.constants.PIPE_LAYOUT_CURVED`` = 0
394394
``NodeGraphQt.constants.PIPE_LAYOUT_STRAIGHT`` = 1
395+
``NodeGraphQt.constants.PIPE_LAYOUT_ANGLE`` = 2
395396
396397
Args:
397398
style (int): pipe style.
398399
"""
399-
pipe_default = max([PIPE_LAYOUT_CURVED, PIPE_LAYOUT_STRAIGHT])
400+
pipe_default = max([PIPE_LAYOUT_CURVED,
401+
PIPE_LAYOUT_STRAIGHT,
402+
PIPE_LAYOUT_ANGLE])
400403
style = PIPE_LAYOUT_STRAIGHT if style > pipe_default else style
401404
self._viewer.set_pipe_layout(style)
402405

NodeGraphQt/qgraphics/pipe.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ def draw_path(self, start_port, end_port=None, cursor_pos=None):
200200
path.lineTo(pos2)
201201
self.setPath(path)
202202

203-
204203
def reset_path(self):
205204
path = QtGui.QPainterPath(QtCore.QPointF(0.0, 0.0))
206205
self.setPath(path)

0 commit comments

Comments
 (0)