Thank you very much for including sample files with your question.
The "extra edges" as you call them are actually not generated by One-Click layout (or any other layout algorithm) but exist in your sample files already. You can check this for yourself:
- Ensure no elements are selected. (If there are selected elements, simply click on empty space to unselect all.)
- Take a look at the properties view in yEd's lower right corner. This will list the total number of nodes and edges in the current diagram.
E.g. for your self-loop-del.graphml sample, it says:
- Count the actually visible edges in your diagram.
E.g. for your self-loop-del.graphml sample, there are only five visible edges.
(In your self-loop.graphml sample, there are 24 visible edges out of 52 edges in total.)
Since all the non-visible edges are self-loops, I think you simply created those by accident. You probably started edge creation, moved the mouse out of your start node, then back into your start node, and released the mouse button in the start node. Unfortunately, your default edge style seems to be "Arc" which simply is not suited for self-loops which is why you do not see them by default.
To get rid of all the undesired edges, select all self-loops and press DELETE to remove all the non-visible but nevertheless selected edges.
To select all self-loops:
- Open "Tools" -> "Select Elements".
- On tab "General", select "Clear Selection First" and only ""Clear Selection First".
- On tab "Edges", select "Use these Criteria" and choose "All Selfloops" for option "Select".
- On all other tabs, ensure that "Use these Criteria" is not selected.
- Click "Ok".
Finally, the fact that self-loops are sometimes selected after running One-Click layout is actually a bug (layout algorithms should never modify the current selection) and will be fixed in a future release. Thank you very much for bringing this to our attention.