Skip to content

Commit

Permalink
Allow clicking dummy atoms for connecting pieces
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Nov 11, 2024
1 parent 2dd7a0d commit 48dccd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avogadro/qtplugins/templatetool/templatetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,10 @@ Matrix3 applyKabsch(std::vector<Vector3> templatePoints,
void TemplateTool::atomLeftClick(QMouseEvent*)
{
size_t selectedIndex = m_clickedObject.index;
// if it's a valid selected atom and a hydrogen or dummy atom
if (m_molecule->atom(selectedIndex).isValid() &&
m_molecule->atomicNumber(selectedIndex) == 1) {
(m_molecule->atomicNumber(selectedIndex) == 1 ||
m_molecule->atomicNumber(selectedIndex) == 0)) {
m_toolWidget->selectedUIDs().push_back(
m_molecule->atomUniqueId(selectedIndex));
if (static_cast<int>(m_toolWidget->selectedUIDs().size()) !=
Expand Down

0 comments on commit 48dccd5

Please sign in to comment.