Skip to content

Commit

Permalink
Fix setting relationships to update UI properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic98 committed Sep 26, 2024
1 parent 1bce215 commit b7f3108
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions cura/BuildVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ def _updateUsedExtruders(self):
for extruder in global_container_stack.extruderList:
used = extruder in used_extruders
extruder.definitionChanges.setProperty("extruder_used", "value", used)
global_container_stack.definitionChanges.setProperty("extruders_used", "value", [extruder.position for extruder in used_extruders])

def _nodeActiveExtruderChanged(self):
self._updateDisallowedAreasAndRebuild()
Expand Down
11 changes: 11 additions & 0 deletions resources/definitions/fdmextruder.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
"settable_per_meshgroup": false,
"type": "extruder"
},
"extruder_used":
{
"default_value": true,
"description": "Is this extruder used for printing. This setting is controlled by Cura automatically.",
"label": "Extruder Used",
"settable_globally": false,
"settable_per_extruder": true,
"settable_per_mesh": false,
"settable_per_meshgroup": false,
"type": "bool"
},
"extruder_prime_pos_z":
{
"default_value": 0,
Expand Down
18 changes: 9 additions & 9 deletions resources/definitions/fdmprinter.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,16 @@
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"extruder_used":
"extruders_used":
{
"default_value": true,
"description": "Is this extruder used for printing. This setting is controlled by Cura automatically.",
"label": "Extruder Used",
"settable_globally": false,
"settable_per_extruder": true,
"default_value": [],
"description": "A list of extruder positions that are used. This setting is controlled by Cura automatically.",
"label": "Extruders Used",
"settable_globally": true,
"settable_per_extruder": false,
"settable_per_mesh": false,
"settable_per_meshgroup": false,
"type": "bool"
"type": "[int]"
},
"machine_nozzle_tip_outer_diameter":
{
Expand Down Expand Up @@ -2494,7 +2494,7 @@
"enabled": "machine_heated_build_volume",
"settable_per_mesh": false,
"settable_per_extruder": false,
"depends_on_settings": [ "extruder_used" ]
"depends_on_settings": [ "extruders_used" ]
},
"material_print_temperature":
{
Expand Down Expand Up @@ -2608,7 +2608,7 @@
"settable_per_mesh": false,
"settable_per_extruder": false,
"settable_per_meshgroup": false,
"depends_on_settings": [ "extruder_used" ]
"depends_on_settings": [ "extruders_used" ]
},
"material_bed_temperature_layer_0":
{
Expand Down

0 comments on commit b7f3108

Please sign in to comment.