mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Removed singleton UM.OperationStack, merged with CuraActions
Removed ActiveTool singleton added to controller singleton CURA-7812
This commit is contained in:
parent
d01b5c1767
commit
676099ccf6
7 changed files with 45 additions and 21 deletions
|
@ -25,7 +25,7 @@ UM.TooltipArea
|
|||
onClicked:
|
||||
{
|
||||
addedSettingsModel.setVisible(model.key, checked);
|
||||
UM.ActiveTool.forceUpdate();
|
||||
UM.Controller.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Item
|
|||
readonly property string infillMeshType: "infill_mesh"
|
||||
readonly property string antiOverhangMeshType: "anti_overhang_mesh"
|
||||
|
||||
property var currentMeshType: UM.ActiveTool.properties.getValue("MeshType")
|
||||
property var currentMeshType: UM.Controller.properties.getValue("MeshType")
|
||||
|
||||
// Update the view every time the currentMeshType changes
|
||||
onCurrentMeshTypeChanged:
|
||||
|
@ -56,7 +56,7 @@ Item
|
|||
|
||||
function setMeshType(type)
|
||||
{
|
||||
UM.ActiveTool.setProperty("MeshType", type)
|
||||
UM.Controller.setProperty("MeshType", type)
|
||||
updateMeshTypeCheckedState(type)
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ Item
|
|||
visibilityHandler: Cura.PerObjectSettingVisibilityHandler
|
||||
{
|
||||
id: visibility_handler
|
||||
selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId")
|
||||
selectedObjectId: UM.Controller.properties.getValue("SelectedObjectId")
|
||||
}
|
||||
|
||||
// For some reason the model object is updated after removing him from the memory and
|
||||
|
@ -320,7 +320,7 @@ Item
|
|||
{
|
||||
id: provider
|
||||
|
||||
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
|
||||
containerStackId: UM.Controller.properties.getValue("ContainerID")
|
||||
key: model.key
|
||||
watchedProperties: [ "value", "enabled", "validationState" ]
|
||||
storeIndex: 0
|
||||
|
@ -330,7 +330,7 @@ Item
|
|||
UM.SettingPropertyProvider
|
||||
{
|
||||
id: inheritStackProvider
|
||||
containerStackId: UM.ActiveTool.properties.getValue("ContainerID")
|
||||
containerStackId: UM.Controller.properties.getValue("ContainerID")
|
||||
key: model.key
|
||||
watchedProperties: [ "limit_to_extruder" ]
|
||||
}
|
||||
|
@ -381,22 +381,22 @@ Item
|
|||
|
||||
Connections
|
||||
{
|
||||
target: UM.ActiveTool
|
||||
target: UM.Controller
|
||||
function onPropertiesChanged()
|
||||
{
|
||||
// the values cannot be bound with UM.ActiveTool.properties.getValue() calls,
|
||||
// the values cannot be bound with UM.Controller.properties.getValue() calls,
|
||||
// so here we connect to the signal and update the those values.
|
||||
if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined")
|
||||
if (typeof UM.Controller.properties.getValue("SelectedObjectId") !== "undefined")
|
||||
{
|
||||
const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId")
|
||||
const selectedObjectId = UM.Controller.properties.getValue("SelectedObjectId")
|
||||
if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId)
|
||||
{
|
||||
addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId
|
||||
}
|
||||
}
|
||||
if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined")
|
||||
if (typeof UM.Controller.properties.getValue("ContainerID") !== "undefined")
|
||||
{
|
||||
const containerId = UM.ActiveTool.properties.getValue("ContainerID")
|
||||
const containerId = UM.Controller.properties.getValue("ContainerID")
|
||||
if (provider.containerStackId !== containerId)
|
||||
{
|
||||
provider.containerStackId = containerId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue