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

ElmerGUI: unable to select multiple surfaces #411

Open
agalakhov opened this issue Jul 20, 2023 · 1 comment
Open

ElmerGUI: unable to select multiple surfaces #411

agalakhov opened this issue Jul 20, 2023 · 1 comment

Comments

@agalakhov
Copy link

In most recent Git (devel) versions holding Ctrl to select multiple surfaces (i.e. for Unify) either is not reliable or does not work at all.

Steps to reproduce:

  • Open "cooler.grd"
  • Divide surface
  • Hold Ctrl and try selecting surfaces by double-clicking on them
@agalakhov
Copy link
Author

agalakhov commented Jul 21, 2023

I traced this problem down to thread-safety. The variable GLWindet::ctrlPressed is a non-atomic bool, and there is no single memory barrier used in the code. Despite setting it to true in the event handler, it could still be read as false in another event handler if the processor is multi-core and has advanced caching. But changing it to std::atomic_bool is only a partial solution. While I can now select multiple surfaces, the software still behaves in a very odd way. Looks like there are even more race conditions.

t7saeki added a commit to t7saeki/elmerfem that referenced this issue Jul 22, 2023
Fix for issue ElmerCSC#441 (ElmerGUI: unable to select multiple surfaces ElmerCSC#411) by leveraging MouseEvent::modifiers() instead of these bool variables.
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