diff --git a/openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-scriptrunner/src/tools/ScriptRunner/ScriptRunner.vue b/openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-scriptrunner/src/tools/ScriptRunner/ScriptRunner.vue index ade635827..1bcddefee 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-scriptrunner/src/tools/ScriptRunner/ScriptRunner.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-scriptrunner/src/tools/ScriptRunner/ScriptRunner.vue @@ -249,7 +249,6 @@ v-for="item in executeSelectionMenuItems" link :key="item.label" - :disabled="scriptId" > {{ item.label }} @@ -887,20 +886,34 @@ export default { ] }, executeSelectionMenuItems: function () { - return [ - { - label: 'Execute selection', - command: this.executeSelection, - }, - { - label: 'Run from here', - command: this.runFromCursor, - }, - { - label: 'Clear local breakpoints', - command: this.clearBreakpoints, - }, - ] + if (this.scriptId) { + return [ + { + label: 'Execute selection', + command: this.executeSelection, + }, + { + label: 'Run from here', + command: this.runFromCursor, + }, + // Can't clear local breakpoints in a running script + ] + } else { + return [ + { + label: 'Execute selection', + command: this.executeSelection, + }, + { + label: 'Run from here', + command: this.runFromCursor, + }, + { + label: 'Clear local breakpoints', + command: this.clearBreakpoints, + }, + ] + } }, }, watch: {