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

GUI: fix the abort button #997

Closed
wants to merge 1 commit into from

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Dec 23, 2022

GUI: fix the abort button

Make the abort button in the progress dialog
work. This is accomplished by loading simulation
files in the background thread, but creating
the simulation in the AWT thread, and then
invokeLater to transfer the simulation back
to the background thread.

This is preparation for letting the user keep
the current simulation when loading a new simulation
fails.

@pjonsson pjonsson marked this pull request as draft December 23, 2022 12:43
Make the abort button in the progress dialog
work. This is accomplished by loading simulation
files in the background thread, but creating
the simulation in the AWT thread, and then
invokeLater to transfer the simulation back
to the background thread.

This is preparation for letting the user keep
the current simulation when loading a new simulation
fails.
@pjonsson pjonsson force-pushed the gui-simplify-worker branch from c38e21c to bc64705 Compare December 23, 2022 12:44
@pjonsson pjonsson changed the title GUI: start progress bar from background GUI: fix the abort button Dec 23, 2022
@pjonsson pjonsson marked this pull request as ready for review December 23, 2022 12:45
@pjonsson
Copy link
Contributor Author

@nfi Turned out the progress bar could be invoked in a different way, so this patch changed quite a lot to what you reviewed.

@pjonsson
Copy link
Contributor Author

This hangs the UI on OS X, which makes sense since Cooja does everything in the AWT thread.

Will move the GUI elements into the GUI class instead, starting with #1041.

@pjonsson
Copy link
Contributor Author

The updated #918 solves this problem.

@pjonsson pjonsson closed this Jan 13, 2023
@pjonsson pjonsson deleted the gui-simplify-worker branch January 13, 2023 19:21
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

Successfully merging this pull request may close these issues.

2 participants