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 Oct 7, 2023
1 parent 30a750c commit 8b97201
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
5 changes: 2 additions & 3 deletions avogadro/core/coordinateblockgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ std::string CoordinateBlockGenerator::generateCoordinateBlock()
m_stream << std::left << std::setw(elementSymbolWidth) << symbol;
break;
case 'L':
m_stream << std::left << symbol
<< elementCounts[atomicNumber] << " ";
m_stream << std::left << symbol << elementCounts[atomicNumber] << " ";
break;
case 'N':
m_stream << std::left << std::setw(elementNameWidth) << name;
Expand Down Expand Up @@ -203,4 +202,4 @@ std::string CoordinateBlockGenerator::generateCoordinateBlock()
return m_stream.str();
}

} // namespace Avogadro
} // namespace Avogadro::Core
2 changes: 1 addition & 1 deletion avogadro/core/coordinateblockgenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AVOGADROCORE_EXPORT CoordinateBlockGenerator
* about each atom in the coordinate block.
* - @c #: Atom index (one-based index)
* - @c Z: Atomic number (e.g. "6" for carbon)
* - @c L: Atomic label (e.g., "C1" for first carbon, "H2" for second hydrogen")
* - @c L: Atomic label (e.g., "C1" for first carbon)")
* - @c G: GAMESS-styled Atomic number (e.g. "6.0" for carbon)
* - @c S: Element symbol (e.g. "C" for carbon)
* - @c N: Element name (e.g. "Carbon")
Expand Down
10 changes: 4 additions & 6 deletions avogadro/qtplugins/coordinateeditor/coordinateeditordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
#define FORMAT_DEBUG(x)
#endif // ENABLE_FORMAT_DEBUG

using Avogadro::QtGui::Molecule;
using Avogadro::Core::Elements;
using Avogadro::Vector3;
using Avogadro::Core::Elements;
using Avogadro::QtGui::Molecule;

namespace {

Expand Down Expand Up @@ -96,7 +96,7 @@ struct AtomStruct
Vector3 pos;
};

} // end anon namespace
} // namespace

namespace Avogadro::QtPlugins {

Expand Down Expand Up @@ -387,7 +387,6 @@ void CoordinateEditorDialog::validateInputWorker()

case 'L': {
// Validate label (symbol + number)

QString cleanToken(tokenCursor.selectedText().toLower());
if (!cleanToken.isEmpty())
cleanToken.replace(0, 1, cleanToken[0].toUpper());
Expand All @@ -406,7 +405,6 @@ void CoordinateEditorDialog::validateInputWorker()
else
m_ui->text->markValid(tokenCursor, tr("Element symbol."));
break;

}

case '#': {
Expand Down Expand Up @@ -845,4 +843,4 @@ void CoordinateEditorDialog::clearClicked()
m_ui->text->document()->clear();
}

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

0 comments on commit 8b97201

Please sign in to comment.