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

UIService.showUI() shows multiple instances of the same UI #460

Closed
gselzer opened this issue May 4, 2023 · 0 comments · Fixed by #465
Closed

UIService.showUI() shows multiple instances of the same UI #460

gselzer opened this issue May 4, 2023 · 0 comments · Fixed by #465
Assignees
Labels

Comments

@gselzer
Copy link
Member

gselzer commented May 4, 2023

I found this with the ImageJ2 UI in napari-imagej:

image

Ideally, UIService.show() would check if there is already a UI visible, and then, if it is, ensure that the application frame is also visible. This is what I was doing in napari-imagej, however it is a little hacky (why would the ImageJ2 UI be visible and the application frame not be?)

Note that in napari-imagej, I also kill all WindowListeners, and add my own that hides the window when the user presses the close button, instead of actually closing the window.

@gselzer gselzer added the bug label May 4, 2023
ctrueden added a commit to imagej/pyimagej that referenced this issue May 5, 2023
It takes care to show the UI on the AWT event dispatch thread.

If the UI is already visible, it raises the application frame instead of
calling ij.ui().showUI() again, since SciJava Common currently has a bug
when doing that where it hoses the UI (see scijava/scijava-common#460).
ctrueden added a commit to imagej/pyimagej that referenced this issue May 5, 2023
It takes care to show the UI on the AWT event dispatch thread.

If the UI is already visible, it raises the application frame instead of
calling ij.ui().showUI() again, since SciJava Common currently has a bug
when doing that where it hoses the UI (see scijava/scijava-common#460).
ctrueden added a commit to imagej/pyimagej that referenced this issue May 5, 2023
It takes care to show the UI on the AWT event dispatch thread.

If the UI is already visible, it raises the application frame instead of
calling ij.ui().showUI() again, since SciJava Common currently has a bug
when doing that where it hoses the UI (see scijava/scijava-common#460).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants