fix: fix macro parameter with spaces (#1551)
This commit is contained in:
parent
ecaa894fbb
commit
c87586aebb
@ -199,9 +199,13 @@ export default class MacroButton extends Mixins(BaseMixin) {
|
||||
sendWithParams() {
|
||||
let params: string[] = []
|
||||
this.paramArray.forEach((paramname: string) => {
|
||||
if (this.params[paramname].value !== null && this.params[paramname].value !== '') {
|
||||
let value = this.params[paramname].value?.toString().trim()
|
||||
|
||||
if (this.params[paramname].value !== null && value !== '') {
|
||||
let tmp: string = paramname
|
||||
tmp += this.isGcodeStyle ? this.params[paramname].value : `=${this.params[paramname].value}`
|
||||
if (value?.includes(' ')) value = `"${value}"`
|
||||
|
||||
tmp += this.isGcodeStyle ? value : `=${value}`
|
||||
|
||||
params.push(tmp)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user