Skip to content

Commit

Permalink
Fixed 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 26, 2023
1 parent e2d8d3e commit 8d9d775
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions avogadro/qtgui/interfacescript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ InterfaceScript::InterfaceScript(const QString& scriptFilePath_,
QObject* parent_)
: QObject(parent_), m_interpreter(new PythonScript(scriptFilePath_, this)),
m_moleculeExtension(QStringLiteral("Unknown"))
{}
{
}

InterfaceScript::InterfaceScript(QObject* parent_)
: QObject(parent_), m_interpreter(new PythonScript(this)),
m_moleculeExtension(QStringLiteral("Unknown"))
{}
{
}

InterfaceScript::~InterfaceScript() {}

Expand Down Expand Up @@ -162,7 +164,8 @@ bool InterfaceScript::runCommand(const QJsonObject& options_,
if (!insertMolecule(allOptions, *mol))
return false;

connect(m_interpreter, &PythonScript::finished, this, &::Avogadro::QtGui::InterfaceScript::commandFinished);
connect(m_interpreter, &PythonScript::finished, this,
&::Avogadro::QtGui::InterfaceScript::commandFinished);
m_interpreter->asyncExecute(QStringList() << QStringLiteral("--run-command"),
QJsonDocument(allOptions).toJson());
return true;
Expand Down Expand Up @@ -257,8 +260,7 @@ bool InterfaceScript::processCommand(Core::Molecule* mol)
}

// select some atoms
if (obj.contains("selectedAtoms") &&
obj["selectedAtoms"].isArray()) {
if (obj.contains("selectedAtoms") && obj["selectedAtoms"].isArray()) {
QJsonArray selectedList = obj["selectedAtoms"].toArray();
for (int i = 0; i < selectedList.size(); ++i) {
if (selectedList[i].isDouble()) {
Expand Down Expand Up @@ -843,4 +845,4 @@ bool InterfaceScript::parsePattern(const QJsonValue& json,
return true;
}

} // namespace Avogadro
} // namespace Avogadro::QtGui

1 comment on commit 8d9d775

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: clang-format-diff detected formatting issues. See the artifact for a patch or run clang-format on your branch.

Please sign in to comment.