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

empty message box pops up with "Download by Name" dialog #1965

Open
drew-parsons opened this issue Feb 6, 2025 · 0 comments
Open

empty message box pops up with "Download by Name" dialog #1965

drew-parsons opened this issue Feb 6, 2025 · 0 comments

Comments

@drew-parsons
Copy link
Contributor

Avogadro version:

  • Avogadrolibs: 1.100.0-421-g9593af8
  • Qt: 6.7.2

Desktop version: (please complete the following information):

  • OS: Linux
  • Version 6.12.12 (Debian unstable)
  • Compiler gcc 14.2.0

Describe the bug

When the "Download by Name" dialog is activated to import a molecule, a second empty window pops up 5 seconds after the "Download by Name" window. It looks like an empty message window, having no input fields. Sometimes it pops up directly over the dialog window, which gets confusing since it feels like it must be the dialog box, yet has no input (if you move it aside you find the actual dialog box underneath).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'File'→'Import'
  2. Click on 'Download by Name...'
  3. See dialog box (maybe)
  4. See erroneous empty box

Expected behavior
The second empty window should not appear when "Download by Name" is activated.

Screenshots

Image

Additional context
I suspect this second empty box is a bug in the showDialog() function in networkdatabases.cpp.
I think it might be the progessDialog created at

m_progressDialog = new QProgressDialog(qobject_cast<QWidget*>(parent()));

It seem like the progressDialog is created and pops up before it is needed (i.e. before a molecule has even been entered in the dialog box).
Perhaps the progressDialog should not be created before input has been entered?
Or if it does need to be created at l.70, then perhaps it needs to be created with visible: false . For QProgressDialog I think this means creating with minimumDuration=0 . The default is 4000 ms, which would explain why it pops up after 4 seconds.

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

1 participant