diff --git a/avogadro/qtplugins/forcefield/forcefield.cpp b/avogadro/qtplugins/forcefield/forcefield.cpp index 70bf78172f..49dadc94e9 100644 --- a/avogadro/qtplugins/forcefield/forcefield.cpp +++ b/avogadro/qtplugins/forcefield/forcefield.cpp @@ -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 Forcefield::actions() const -{ - return m_actions; -} - -void Forcefield::deferredStart() -{ + // initialize the calculators // prefer to use Python interface scripts if available refreshScripts(); @@ -150,6 +138,13 @@ void Forcefield::deferredStart() #endif } +Forcefield::~Forcefield() {} + +QList Forcefield::actions() const +{ + return m_actions; +} + QStringList Forcefield::menuPath(QAction* action) const { QStringList path; diff --git a/avogadro/qtplugins/forcefield/forcefield.h b/avogadro/qtplugins/forcefield/forcefield.h index 7b8bcc98f9..a08e75675c 100644 --- a/avogadro/qtplugins/forcefield/forcefield.h +++ b/avogadro/qtplugins/forcefield/forcefield.h @@ -76,8 +76,6 @@ private slots: void freezeSelected(); void unfreezeSelected(); - void deferredStart(); - private: QList m_actions; QtGui::Molecule* m_molecule = nullptr; diff --git a/avogadro/vtk/CMakeLists.txt b/avogadro/vtk/CMakeLists.txt index 549626e42f..6cfc703d92 100644 --- a/avogadro/vtk/CMakeLists.txt +++ b/avogadro/vtk/CMakeLists.txt @@ -1,3 +1,4 @@ +find_package(OpenGL REQUIRED) find_package(GLEW REQUIRED) if(WIN32 AND NOT BUILD_SHARED_LIBS)