Skip to content

Commit

Permalink
Revert the deferred start for forcefields
Browse files Browse the repository at this point in the history
Hopefully this will avoid current issues with optimizing?

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Dec 19, 2024
1 parent ca8a17e commit ab89fb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 8 additions & 13 deletions avogadro/qtplugins/forcefield/forcefield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,7 @@ Forcefield::Forcefield(QObject* parent_)
connect(action, SIGNAL(triggered()), SLOT(unfreezeSelected()));
m_actions.push_back(action);

// single-shot timer to allow the GUI to start up
QTimer::singleShot(500, this, SLOT(deferredStart()));
}

Forcefield::~Forcefield() {}

QList<QAction*> Forcefield::actions() const
{
return m_actions;
}

void Forcefield::deferredStart()
{
// initialize the calculators

// prefer to use Python interface scripts if available
refreshScripts();
Expand All @@ -150,6 +138,13 @@ void Forcefield::deferredStart()
#endif
}

Forcefield::~Forcefield() {}

QList<QAction*> Forcefield::actions() const
{
return m_actions;
}

QStringList Forcefield::menuPath(QAction* action) const
{
QStringList path;
Expand Down
2 changes: 0 additions & 2 deletions avogadro/qtplugins/forcefield/forcefield.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ private slots:
void freezeSelected();
void unfreezeSelected();

void deferredStart();

private:
QList<QAction*> m_actions;
QtGui::Molecule* m_molecule = nullptr;
Expand Down

1 comment on commit ab89fb0

@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.