graph editing: only connect if theres something to connect
This commit is contained in:
parent
0bc95280a2
commit
906f3d5844
1 changed files with 1 additions and 1 deletions
|
@ -347,7 +347,7 @@ def connect_nodes(request, active_node, clicked_node, edge_settings_form, graph_
|
|||
after_connect_nodes_setting = graph_editing_settings['after_connect_nodes']
|
||||
|
||||
new_connections = []
|
||||
if connect_nodes_setting in ('bidirectional', 'unidirectional', 'unidirectional_force'):
|
||||
if connect_nodes_setting in ('bidirectional', 'unidirectional', 'unidirectional_force') and active_node is not None:
|
||||
new_connections.append((active_node, clicked_node, False))
|
||||
if connect_nodes_setting == 'bidirectional':
|
||||
new_connections.append((clicked_node, active_node, True))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue