Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Feb 17, 2024
1 parent c8f1e88 commit 2abddda
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions avogadro/qtplugins/select/select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,23 +452,23 @@ void Select::selectAtomIndex()
auto range = item.split('-');
if (range.size() == 2) {
bool ok1, ok2;
int k=m_molecule->atomCount();
int k = m_molecule->atomCount();
int start = range.first().toInt(&ok1);
int last = range.back().toInt(&ok2);
if (ok1 && ok2) {
if(start<k)
for (int i = start; i <= last; ++i)
m_molecule->undoMolecule()->setAtomSelected(i, evalSelect(true, i),
undoText);
if (start < k)
for (int i = start; i <= last; ++i)
m_molecule->undoMolecule()->setAtomSelected(
i, evalSelect(true, i), undoText);
}
}
} else {
int i = item.toInt(&ok);
int k = m_molecule->atomCount();
if (ok)
if(i<k)
m_molecule->undoMolecule()->setAtomSelected(i, evalSelect(true, i),
undoText);
if (i < k)
m_molecule->undoMolecule()->setAtomSelected(i, evalSelect(true, i),
undoText);
}
}

Expand Down Expand Up @@ -580,4 +580,4 @@ void Select::createLayerFromSelection()
rwmol->emitChanged(changes);
}

} // namespace Avogadro::QtPlugins
} // namespace Avogadro::QtPlugins

0 comments on commit 2abddda

Please sign in to comment.