Action The actionperformed method is not triggered ?
Answered
In the update method of action. I will judge whether it is enabled.
If I press the shortcut key in the disabled state and do not release it (it may have been enabled at this time)
I will trigger it again through the shortcut. actionperformed will not be called, and only the update method will be called at this time
Please sign in to leave a comment.
More detailed description: I'm doing something that takes time to run in the background. At this time, I will disable action first and restore it after running.
1. Before starting operation (press shortcut key and hold)
2. In operation (hold, it is disabled at this time and will not be triggered again)
3. Operation completion (release)
At this point, pressing the shortcut key again will not trigger the actionperformed method.
Hi,
I'm sorry, but I don't understand your use case and the issue. Why would you hold an action button during the operation? What is your exact use case?
Sorry, I haven't been here for a long time. This problem has been solved