Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit f646625

Browse files
committed
fix broken disconnect
related to Tanneguydv/Pythonocc-nodes-for-Ryven#18
1 parent c7b43a3 commit f646625

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

ryvencore_qt/src/flows/FlowView.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -884,17 +884,15 @@ def connection_request_valid(self, valid: bool):
884884
if out.io_pos == PortObjPos.INPUT:
885885
out, inp = inp, out
886886

887-
# remove forbidden connections
888-
if inp.type_ == 'data':
889-
if self.flow.connected_output(inp) == out:
890-
# if the exact connection exists, we want to remove it by command
891-
self._push_undo(
892-
ConnectPorts_Command(self, out=self.flow.connected_output(inp), inp=inp)
893-
)
894-
895-
self._push_undo(
896-
ConnectPorts_Command(self, out=out, inp=inp)
897-
)
887+
if self.flow.connected_output(inp) == out:
888+
# if the exact connection exists, we want to remove it by command
889+
self._push_undo(
890+
ConnectPorts_Command(self, out=self.flow.connected_output(inp), inp=inp)
891+
)
892+
else:
893+
self._push_undo(
894+
ConnectPorts_Command(self, out=out, inp=inp)
895+
)
898896

899897
def add_connection(self, c: Tuple[NodeOutput, NodeInput]):
900898
out, inp = c

0 commit comments

Comments
 (0)