hanspi42 / signalflowgrapher

This Python tool allows you to draw signal-flow graphs, calculate transfer functions (SymPy code is generated for further use in Jupyter notebooks), do graph manipulations (e.g., node elimination and graph transposition), and save a graph as TikZ for use in LaTeX documentation.
Artistic License 2.0
30 stars 6 forks source link

Delete-Key functionality not working #32

Open xykro opened 3 years ago

xykro commented 3 years ago

Description Using the Del-Key to delete nodes or branches does not seem to be working (as stated as shortcut in Edit >> Remove Node(s) or Branch(es))

Possible root of the problem The problem seems to me that the focus is in the name/weight field. This leads to the delete input to be grabbed by this field instead of the drawing canvas.

Fix Either forward the delete input to the canvas (no technical fix provided here), or remove the note of the shortcut (only mention is in the menu). Nevertheless, it would be a nice and convenient feature, so this issue could be marked as an enhancement as well.

hanspi42 commented 3 years ago

Thank you!

The problem is that selecting a single node or branch will, as you say, put the focus in the weight field. As soon as you select two objects, DEL works.

The fix to forward delete to the canvas is an idea, but should only be done if the cursor is at the very end of the text field. If it is not at the end, it should work in the text.

Alternatively, the shortcut for deletion could be ctrl-x