Skip to content

Commit

Permalink
Merge pull request #418 from ghutchis/add-energy-scripts
Browse files Browse the repository at this point in the history
Add support for installing energy scripts
  • Loading branch information
ghutchis authored Oct 24, 2023
2 parents bdf6cd3 + 35171f1 commit 9aeae19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -853,6 +854,9 @@ bool MainWindow::addScript(const QString& filePath)
case 4:
typePath = "charges";
break;
case 5:
typePath = "energy";
break;
default:
typePath = "other";
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9aeae19

Please sign in to comment.