From ee89187dffa4f63ed0d5e6cf1ffd2414eaf3978c Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Mon, 23 Oct 2023 14:56:18 -0400 Subject: [PATCH] Add support for installing energy scripts Signed-off-by: Geoff Hutchison --- avogadro/mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/avogadro/mainwindow.cpp b/avogadro/mainwindow.cpp index bf5a340b..09d1e4a2 100644 --- a/avogadro/mainwindow.cpp +++ b/avogadro/mainwindow.cpp @@ -826,7 +826,8 @@ bool MainWindow::addScript(const QString& filePath) // TODO: add some sort of warning? QStringList types; types << tr("Commands") << tr("Input Generators") << tr("File Formats") - << tr("Charges", "atomic electrostatics"); + << tr("Charges", "atomic electrostatics") + << tr("Force Fields", "potential energy calculators"); bool ok; QString item = @@ -853,6 +854,9 @@ bool MainWindow::addScript(const QString& filePath) case 4: typePath = "charges"; break; + case 5: + typePath = "energy" + break; default: typePath = "other"; } @@ -2529,7 +2533,7 @@ bool MainWindow::handleCommand(const QString& command, glWidget->setActiveTool(tool->objectName()); bool result = tool->handleCommand(command, options); glWidget->setActiveTool(currentTool); - + return result; } else if (m_extensionCommandMap.contains(command)) { auto* extension = m_extensionCommandMap.value(command);