File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -385,22 +385,23 @@ def set_acyclic(self, mode=False):
385385 self ._model .acyclic = mode
386386 self ._viewer .acyclic = mode
387387
388- def set_pipe_style (self , style = None ):
388+ def set_pipe_style (self , style = PIPE_LAYOUT_CURVED ):
389389 """
390- Set node graph pipes to be drawn straight or curved by default
391- all pipes are set curved. (default=0)
390+ Set node graph pipes to be drawn as straight, curved or angled.
391+ By default all pipes are set curved.
392392
393- ``NodeGraphQt.constants.PIPE_LAYOUT_CURVED`` = 0
394- ``NodeGraphQt.constants.PIPE_LAYOUT_STRAIGHT`` = 1
395- ``NodeGraphQt.constants.PIPE_LAYOUT_ANGLE`` = 2
393+ Pipe Styles:
394+ ``NodeGraphQt.constants.PIPE_LAYOUT_CURVED``
395+ ``NodeGraphQt.constants.PIPE_LAYOUT_STRAIGHT``
396+ ``NodeGraphQt.constants.PIPE_LAYOUT_ANGLE``
396397
397398 Args:
398399 style (int): pipe style.
399400 """
400- pipe_default = max ([PIPE_LAYOUT_CURVED ,
401- PIPE_LAYOUT_STRAIGHT ,
402- PIPE_LAYOUT_ANGLE ])
403- style = PIPE_LAYOUT_STRAIGHT if style > pipe_default else style
401+ pipe_max = max ([PIPE_LAYOUT_CURVED ,
402+ PIPE_LAYOUT_STRAIGHT ,
403+ PIPE_LAYOUT_ANGLE ])
404+ style = style if 0 >= style >= pipe_max else PIPE_LAYOUT_CURVED
404405 self ._viewer .set_pipe_layout (style )
405406
406407 def fit_to_selection (self ):
You can’t perform that action at this time.
0 commit comments