Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Nov 5, 2024
2 parents a3c76cf + 69d286e commit c99c404
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
13 changes: 13 additions & 0 deletions src/components/mixins/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ export default class ControlMixin extends Vue {
return this.$store.getters['gui/getDefaultControlActionButton']
}

get actionButton(): string {
const button = this.$store.state.gui.control.actionButton ?? this.defaultActionButton

if (
(button === 'qgl' && !this.$store.getters['printer/existsQGL']) ||
(button === 'ztilt' && !this.$store.getters['printer/existsZTilt'])
) {
return this.defaultActionButton
}

return button
}

/**
* Axes home states
*/
Expand Down
4 changes: 0 additions & 4 deletions src/components/panels/ToolheadControls/CircleControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,6 @@ export default class CircleControl extends Mixins(BaseMixin, ControlMixin) {
engineOffIcon =
'M3.78 2.5L21.5 20.22l-1.27 1.28L18 19.27V20h-8l-2-2H5v-3H3v3H1v-8h2v3h2v-3l1.87-1.86L2.5 3.77L3.78 2.5M20 9v3h-2V8h-6V6h3V4H7.82l15 15H23V9h-3Z'
get actionButton(): string {
return this.$store.state.gui.control.actionButton ?? this.defaultActionButton
}
get enableXYHoming(): boolean {
return this.$store.state.gui.control.enableXYHoming
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/panels/ToolheadControls/CrossControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,6 @@ export default class CrossControl extends Mixins(BaseMixin, ControlMixin) {
mdiEngineOff = mdiEngineOff
mdiHome = mdiHome
get actionButton(): string {
return this.$store.state.gui.control.actionButton ?? this.defaultActionButton
}
/**
* Step size selection
*/
Expand Down

0 comments on commit c99c404

Please sign in to comment.