Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2019-05-02 10:03:48 +0300
committerLipu Fei <lipu.fei815@gmail.com>2019-05-02 10:03:48 +0300
commitb9d8b8911310251af965ec0387f515570c4061c3 (patch)
tree44fb510c41beac3a4fdc87f1d38d81fe3abe01d0 /plugins/MachineSettingsAction
parent038a5b5942d2858c004f223ace3ce4840846dd0d (diff)
Fix number of extruders not being updated
Diffstat (limited to 'plugins/MachineSettingsAction')
-rw-r--r--plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml b/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml
index 007db41f2b..3b31a5de36 100644
--- a/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml
+++ b/plugins/MachineSettingsAction/MachineSettingsPrinterTab.qml
@@ -285,18 +285,30 @@ Item
optionModel: ListModel
{
id: extruderCountModel
+
Component.onCompleted:
{
- extruderCountModel.clear()
+ update()
+ }
+
+ function update()
+ {
+ clear()
for (var i = 1; i <= Cura.MachineManager.activeMachine.maxExtruderCount; i++)
{
// Use String as value. JavaScript only has Number. PropertyProvider.setPropertyValue()
// takes a QVariant as value, and Number gets translated into a float. This will cause problem
// for integer settings such as "Number of Extruders".
- extruderCountModel.append({ text: String(i), value: String(i) })
+ append({ text: String(i), value: String(i) })
}
}
}
+
+ Connections
+ {
+ target: Cura.MachineManager
+ onGlobalContainerChanged: extruderCountModel.update()
+ }
}
}
}