Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete key does not work on modules, since "current module selected" is not known #160

Open
ghost opened this issue May 18, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented May 18, 2021

Describe the bug
The description used to be: "Once a module on screen is clicked, it takes TWO presses of the delete key to remove it."
Apparently this is true, but it only gets removed in that case because it just happened to be the last module added in that particular case, and the delete code does an Undo().
A more proper description should be: "Delete key does not work when you select a module"

Application: Brain Simulator

Module/Network: N/A

To Reproduce
Steps to reproduce the behavior:

  1. Open library network Sallie.
  2. Click the module HearWords.
  3. Press delete and notice this does not delete the module.

Expected behavior
I'd expect either delete with one press of the button, but the code does not know the concept of "currently selected module", so this is a more involved problem.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 Pro 20H2
  • Version: 2021-05-18 master

Add any other context about the problem here.

@ghost ghost changed the title Inserted Module needs two presses of the Delete key to remove. Delete key does not work on modules, since "current module selected" is not known May 23, 2021
@FutureAIGuru
Copy link
Owner

After investigation... the DEL key actually doesn't do much EXCEPT

  1. f a synapse context menu is displayed, it deletes the synapse...this is actually a bit of a problem because the use of the DEL key is ambiguous if a textbox is selected. I fixed this problem so that if a textbox is selection, the DEL applies to the textbox. The problem is that DEL seldom works at all bc a textbox usually has focus in this contextmenu.
  2. if there is a selection, its content is deleted. This is different from ESC which unselects. I left this in place.
  3. the DEL key acted as UNDO. I removed this function so ONLY Ctl-Z is UNDO

Since making this work is a bit painful for little gain and the DEL key is really a special case, I suggest we close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant