OpenChemistry / avogadrolibs

Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
https://two.avogadro.cc/
BSD 3-Clause "New" or "Revised" License
469 stars 175 forks source link

Orthographic: Selection rectangle grabs all atoms #1129

Open ghutchis opened 2 years ago

ghutchis commented 2 years ago

At least on a Mac, if I use the selection rectangle, all atoms seem to be selected.

I can confirm this behavior does not exist in 1.94, but does exist in 1.95 and afterwards.

I'm not sure the bug is in selectiontool.cpp - it might be in the call to m_renderer->hits() instead.

ghutchis commented 2 years ago

Aha, git bisect finds that it derives from #709 b30e2028 (adding the layer system)

Weird bug - if I create multiple layers (e.g., select hydrogens, move them to Layer 2) it seems to work. (At least some/most of the time?)

Screen Shot 2022-08-24 at 2 19 21 PM
ghutchis commented 2 years ago

More importantly, this shows up with orthographic projection, not perspective.

So the problem likely comes from the screen projection.

avo-bot commented 3 months ago

This issue has been mentioned on Avogadro Discussion. There might be relevant details there:

https://discuss.avogadro.cc/t/selection-by-drag-rectangle-doesnt-work-in-orthographic-projection/5542/2