Skip to content

Commit

Permalink
fix: close dialog and stop setSpool function when save_variables not …
Browse files Browse the repository at this point in the history
…exists

Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Dec 1, 2024
1 parent 74e9cd8 commit c948041
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/dialogs/SpoolmanChangeSpoolDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ export default class SpoolmanChangeSpoolDialog extends Mixins(BaseMixin) {
this.$socket.emit('printer.gcode.script', { script: gcode })
// Close dialog if save_variables is not enabled
if (this.existsSaveVariables) this.close()
if (!this.existsSaveVariables) {
this.close()
return
}
// Set spool_id to save_variable
const gcode2 = `SAVE_VARIABLE VARIABLE=${this.tool.toUpperCase()}__SPOOL_ID VALUE=${spool.id}`
Expand Down

0 comments on commit c948041

Please sign in to comment.