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

Tree node popup menu keywords can pick up wrong menu #47

Closed
mtbc opened this issue Aug 16, 2013 · 1 comment
Closed

Tree node popup menu keywords can pick up wrong menu #47

mtbc opened this issue Aug 16, 2013 · 1 comment

Comments

@mtbc
Copy link

mtbc commented Aug 16, 2013

I had an interesting issue where a popup menu item was getting its enabled status wrong. The correct popup menu was being made visible but it turned out that on the application's main toolbar was a submenu with an item with the same text, and it was that item that was being picked up by the JMenuItemMatcher, which matches the menu item text alone even if the path is wrong. Setting the context to the JTree's container didn't help.

As a quick fix I am locally using mtbc/openmicroscopy@5535130 that additionally checks that the JPopupMenu's invoker is the specified JTree, but it's a bit hacked together. It might be good if the SwingLibrary tree node popup stuff also only matched menu items that come from menus invoked by the tree?

@jussimalinen
Copy link
Contributor

Interesting bug. Yeah, I will take a look at this for next release.

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

2 participants