WIP: Fix NozzleMenu extruder binding

This commit is contained in:
Lipu Fei 2018-02-14 22:27:54 +01:00
parent 9ffe89b49c
commit 6dc53eb741
2 changed files with 6 additions and 7 deletions

View File

@ -1,8 +1,8 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.8
import QtQuick.Controls 1.1 import QtQuick.Controls 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura

View File

@ -1,8 +1,8 @@
// Copyright (c) 2017 Ultimaker B.V. // Copyright (c) 2017 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.8
import QtQuick.Controls 1.1 import QtQuick.Controls 1.4
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -27,11 +27,10 @@ Menu
{ {
text: model.hotend_name text: model.hotend_name
checkable: true checkable: true
checked: Cura.MachineManager.activeVariantName == model.hotend_name checked: Cura.MachineManager.activeMachine.extruders[extruderIndex].variant.name == model.hotend_name
exclusiveGroup: group exclusiveGroup: group
onTriggered: { onTriggered: {
var position = Cura.ExtruderManager.activeExtruderIndex; Cura.MachineManager.setVariantGroup(extruderIndex, model.container_node);
Cura.MachineManager.setVariantGroup(position, model.container_node);
} }
} }