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

Loading from AddWorkspaceDialog freezes the GUI #37184

Open
robertapplin opened this issue Apr 18, 2024 · 0 comments
Open

Loading from AddWorkspaceDialog freezes the GUI #37184

robertapplin opened this issue Apr 18, 2024 · 0 comments
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS

Comments

@robertapplin
Copy link
Contributor

robertapplin commented Apr 18, 2024

Describe the bug
When loading a file from the AddWorkspaceDialog's in the Inelastic interfaces, the GUI will freeze while loading takes place. We don't want this to happen. Instead, we want the loading to be performed in a background thread so that the GUI remains responsive. We probably also want to disable the "Add" button on the dialog until it is finished loading. Perhaps changing the "Add" button text to "Loading..." would also make it clear that the data is loading during this time.

In previous situations, I have created a "Manager" class to handle the background thread execution for algorithms. As an examaple, for the ALFView interface, see this class https://github.com/mantidproject/mantid/blob/main/qt/scientific_interfaces/Direct/ALFAlgorithmManager.cpp

To Reproduce

For example

  1. Open Inelastic QENS Fitting interface

  2. Go to F(Q) fit tab

  3. Click Add Workspace

  4. Browse to the following workspace
    irs26176_graphite002_red_Conv_seq_2L_0-50__Result.zip

  5. The GUI will freeze while loading the workspace

  6. When finished loading, the GUI will unfreeze

Expected behavior
The loading should be done in the background thread so the GUI remains responsive. The Add button should be disabled while loading, and the text changed to something like "Loading..."

Platform/Version (please complete the following information):

  • OS: All
@robertapplin robertapplin added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS labels Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Indirect/Inelastic Issues and pull requests related to indirect or inelastic ISIS Team: Spectroscopy Issue and pull requests managed by the Spectroscopy subteam at ISIS
Projects
Status: No status
Development

No branches or pull requests

1 participant