mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 14:19:00 +08:00
CURA-5048 fixed nozzle dependent settings to update after setting machine nozzle diameter in a crude way
This commit is contained in:
parent
76f853c5fb
commit
406e546195
@ -831,10 +831,12 @@ class MachineManager(QObject):
|
|||||||
return self._default_extruder_position
|
return self._default_extruder_position
|
||||||
|
|
||||||
## This will fire the propertiesChanged for all settings so they will be updated in the front-end
|
## This will fire the propertiesChanged for all settings so they will be updated in the front-end
|
||||||
|
@pyqtSlot()
|
||||||
def forceUpdateAllSettings(self):
|
def forceUpdateAllSettings(self):
|
||||||
property_names = ["value", "resolve"]
|
property_names = ["value", "resolve"]
|
||||||
for setting_key in self._global_container_stack.getAllKeys():
|
for container in [self._global_container_stack] + list(self._global_container_stack.extruders.values()):
|
||||||
self._global_container_stack.propertiesChanged.emit(setting_key, property_names)
|
for setting_key in container.getAllKeys():
|
||||||
|
container.propertiesChanged.emit(setting_key, property_names)
|
||||||
|
|
||||||
@pyqtSlot(int, bool)
|
@pyqtSlot(int, bool)
|
||||||
def setExtruderEnabled(self, position: int, enabled) -> None:
|
def setExtruderEnabled(self, position: int, enabled) -> None:
|
||||||
|
@ -382,6 +382,11 @@ Cura.MachineAction
|
|||||||
property string settingKey: "machine_nozzle_size"
|
property string settingKey: "machine_nozzle_size"
|
||||||
property string label: catalog.i18nc("@label", "Nozzle size")
|
property string label: catalog.i18nc("@label", "Nozzle size")
|
||||||
property string unit: catalog.i18nc("@label", "mm")
|
property string unit: catalog.i18nc("@label", "mm")
|
||||||
|
function afterOnEditingFinished()
|
||||||
|
{
|
||||||
|
// Somehow the machine_nozzle_size dependent settings are not updated otherwise
|
||||||
|
Cura.MachineManager.forceUpdateAllSettings()
|
||||||
|
}
|
||||||
property bool isExtruderSetting: true
|
property bool isExtruderSetting: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user