Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -3991,16 +3991,18 @@ void Application::stopAllScripts() { · 3990 unmodified lines | ||
| 3991 | 3991 | scriptAction->activate(QAction::Trigger); |
| 3992 | 3992 | qDebug() << "stopping script..." << scriptAction->text(); |
| 3993 | 3993 | } |
| 3994 | + _activeScripts.clear(); | |
| 3994 | 3995 | } |
| 3995 | 3996 | |
| 3996 | 3997 | void Application::reloadAllScripts() { |
| 3998 | + // remember all the current scripts so we can reload them | |
| 3999 | + QStringList reloadList = _activeScripts; | |
| 3997 | 4000 | // reloads all current running scripts |
| 3998 | 4001 | QList<QAction*> scriptActions = Menu::getInstance()->getActiveScriptsMenu()->actions(); |
| 3999 | 4002 | foreach (QAction* scriptAction, scriptActions) { |
| 4000 | 4003 | scriptAction->activate(QAction::Trigger); |
| 4001 | 4004 | qDebug() << "stopping script..." << scriptAction->text(); |
| 4002 | 4005 | } |
| 4003 | − QStringList reloadList = _activeScripts; | |
| 4004 | 4006 | _activeScripts.clear(); |
| 4005 | 4007 | foreach (QString scriptName, reloadList){ |
| 4006 | 4008 | qDebug() << "reloading script..." << scriptName; |