mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 00:59:01 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
078fd16109
@ -16,23 +16,13 @@ Cura.MachineAction
|
|||||||
property var extrudersModel: Cura.ExtrudersModel{}
|
property var extrudersModel: Cura.ExtrudersModel{}
|
||||||
property int extruderTabsCount: 0
|
property int extruderTabsCount: 0
|
||||||
|
|
||||||
Component.onCompleted:
|
Connections
|
||||||
{
|
{
|
||||||
// Populate extruder tabs after a short delay, because otherwise the tabs that are added when
|
target: base.extrudersModel
|
||||||
// the dialog is created are stuck.
|
onModelChanged:
|
||||||
extruderTabsCountDelay.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer
|
|
||||||
{
|
|
||||||
id: extruderTabsCountDelay
|
|
||||||
repeat: false
|
|
||||||
interval: 1
|
|
||||||
|
|
||||||
onTriggered:
|
|
||||||
{
|
{
|
||||||
var extruderCount = parseInt(machineExtruderCountProvider.properties.value);
|
var extruderCount = base.extrudersModel.rowCount();
|
||||||
base.extruderTabsCount = (extruderCount > 1) ? extruderCount : 0;
|
base.extruderTabsCount = extruderCount > 1 ? extruderCount : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +36,6 @@ Cura.MachineAction
|
|||||||
onAccepted: manager.onFinishAction()
|
onAccepted: manager.onFinishAction()
|
||||||
onRejected: manager.onFinishAction()
|
onRejected: manager.onFinishAction()
|
||||||
onClosing: manager.onFinishAction()
|
onClosing: manager.onFinishAction()
|
||||||
onVisibilityChanged: extruderTabsCountDelay.start()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
@ -383,7 +372,6 @@ Cura.MachineAction
|
|||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
manager.setMachineExtruderCount(index + 1);
|
manager.setMachineExtruderCount(index + 1);
|
||||||
base.extruderTabsCount = (index > 0) ? index + 1 : 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user