Open vhada7 opened 2 years ago
So I think the actual fix here would be the following: to
and then for a more complex case: to
or even
to
Whoever tackles this, please make sure to write some unit tests for these cases! Even better, start with writing the tests and then start fixing the issue!
CreateSnipGateAction
in digital/actions/SnipGateActionFactory.ts
may be expandable to do this. It currently is used with a BUFGate
or a NOTGate
, but I see no reason why it shouldn't/couldn't also work on a WirePort
.
Describe the bug Currently you can connect more than one wire to a WirePort but if you try to snip the port that is connected to those wires you will receive an error message: "Cannot create snip action with WirePort of >2 wires!". The snip actions only works if there are only two wires connected.
To Reproduce Steps to reproduce the behavior: 1.) In the image there are two examples, one with three wires connected and one with four wires connected to a single WirePort. 2.) After highlighting the WirePort and pressing 'x' on the keyboard to snip the port you should receive this error.
Expected behavior One Potential Fix: Have the wires reconnect to the port behind the snipped port
Desktop: