Tail connection not rendered when connector has multiple connections
When a connector has multiple connections and we want to move one, the connection currently being drawn completely disappears.
This fail exist during version 1.4.
To fix issue in master (work on older version to but with previous package name) :
In io.github.eckig.grapheditor.core.connections.ConnectorDragManager
In method
private void detachConnection(final MouseEvent event, final GConnector connector) {
Replace line :
if (!followUpCreated && checkCreatable(opposingConnector)) {
by this one :
if (!followUpCreated && (checkCreatable(opposingConnector) || opposingConnector == newSource)) {
First: Thanks for looking into this!
But: I can not reproduce the issue. Can you tell me a little bit more about the general settings of your editor?
- Do you allow multiple incoming connections?
- Do you have
connectionDetachedOnDragenabled or disabled?
In my model I allow multiple incomming connection on input connector only. connectionDetachedOnDrag is enabled with default handler. In the picture you can show the incomming connection on the top box. When I detach the link on other box (output connector) the tail of connection disapear.
The problem is: Currently the graph-editor only in part supports multiple incoming connections on a single connector.
So my fear is, that we only cover some things up with your proposed patch. The "correct" way would be, to add a proper support for this use case.