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

Selection tool makes entire app transparent #653

Closed
mquevill opened this issue Jul 7, 2021 · 7 comments · Fixed by #656
Closed

Selection tool makes entire app transparent #653

mquevill opened this issue Jul 7, 2021 · 7 comments · Fixed by #656

Comments

@mquevill
Copy link
Contributor

mquevill commented Jul 7, 2021

Avogadro version: 1.94.0-17-gb2b873b

  • Avogadrolibs: 1.94.0-76-g5c867a2
  • Qt: 5.12.8

Desktop version:

  • OS & Version: Linux Mint 20.1 (based on Ubuntu 20.04)
  • Compiler: gcc 9.3.0

Describe the bug
The selection tool makes the entire app transparent, such that you can see whatever is behind it. This happens when selecting atoms or when dragging a box selection. This was originally raised in OpenChemistry/avogadroapp#167 in a comment (see below).

To Reproduce
Select an atom or create a box with the selection tool.

Screenshots
Just one atom selected:
image

Box selection tool:
Screenshot from 2021-07-07 11-26-42

Original comment:

There's a separate transparency issue with the selection tool. With version 1.9.4, when a box is drawn using the cursor to select some atoms, the box has some transparency so any windows underneath the avogadro app become visible. Likewise the pale blue halo around selected atoms exposes the underlying windows.

This problem is less black & white than the background colour issue - the selection halo should be transparent within the app! But it shouldn't expose windows outside the app.

I haven't been able to identify what's controlling it. There's nothing immediately obvious like there was for the backgroundColor setting. The only transparency control I can see in avogadrolibs/avogadro/qtplugins/selectiontools is mesh->setOpacity(180). There's also selectedSpheres->setOpacity(0.42) in qtplugins/ballandstick.

Originally posted by @drew-parsons in OpenChemistry/avogadroapp#167 (comment)

@welcome
Copy link

welcome bot commented Jul 7, 2021

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

@ghutchis ghutchis transferred this issue from OpenChemistry/avogadroapp Jul 7, 2021
@welcome
Copy link

welcome bot commented Jul 7, 2021

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

ghutchis added a commit to ghutchis/avogadrolibs that referenced this issue Jul 8, 2021
Should fix OpenChemistry#653 and related.
Thanks to comment on Qt bug reports:
Giuseppe D'Angelo for a related comment:
 https://bugreports.qt.io/browse/QTBUG-36739

Signed-off-by: Geoff Hutchison <geoff.hutchison@gmail.com>
@ghutchis
Copy link
Member

ghutchis commented Jul 8, 2021

I'm not sure if it's the exact same bug, but a Qt bug report seemed to suggest this as a strategy.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2021

Here are the build results
macOS.dmg
Ubuntu-2004.tar.gz
Win64.exe
Artifacts will only be retained for 90 days.

@drew-parsons
Copy link
Contributor

That looks like the right fix. I'm not sure that nvidia was the problem (it's actually the other way around, it was already working fine with nvidia), but the glBlendFuncSeparate patch resolves the transparency problem all the same.

I've got a hybrid system (bumblebee/primus) with intel or nvidia video. I could reproduce the original transparency problem using the intel driver. When I switched to the nvidia driver (primusrun avogadro2), the problem did not appear. The selection square and the selected atoms did not expose the underlying windows when running with nvidia.

The PR #656 patch applying glBlendFuncSeparate fixes the problem for the intel driver. And the nvidia driver continues to run avogadro2 without problems.

PR #656 looks like a good solution to me.

@ghutchis
Copy link
Member

ghutchis commented Jul 8, 2021

Thanks for the confirmation and the initial report - I'll definitely merge this. I don't know if we'll release a 1.94.1 or just push forward to 1.95 near the end of July.

@mquevill
Copy link
Contributor Author

mquevill commented Jul 8, 2021

I rebuilt from master and can confirm it is fixed!

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 a pull request may close this issue.

3 participants