Removed singleton UM.OperationStack, merged with CuraActions

Removed ActiveTool singleton added to controller singleton

CURA-7812
This commit is contained in:
saumya.jain 2024-01-09 10:29:45 +01:00
parent d01b5c1767
commit 676099ccf6
7 changed files with 45 additions and 21 deletions

View file

@ -120,8 +120,8 @@ Item
text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo")
icon.name: "edit-undo"
shortcut: StandardKey.Undo
onTriggered: UM.OperationStack.undo()
enabled: UM.OperationStack.canUndo
onTriggered: UM.CuraActions.undo()
enabled: UM.CuraActions.canUndo
}
Action
@ -130,8 +130,8 @@ Item
text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo")
icon.name: "edit-redo"
shortcut: StandardKey.Redo
onTriggered: UM.OperationStack.redo()
enabled: UM.OperationStack.canRedo
onTriggered: UM.CuraActions.redo()
enabled: UM.CuraActions.canRedo
}
Action

View file

@ -160,7 +160,7 @@ Item
ProfileWarningReset
{
id: profileWarningReset
width: childrenRect.width
width: parent.width
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
fullWarning: false

View file

@ -223,7 +223,7 @@ SettingItem
cursorShape: Qt.IBeamCursor
onPressed: {
onPressed:(mouse)=> {
if (!input.activeFocus)
{
base.focusGainedByClick = true

View file

@ -203,7 +203,7 @@ Item
x: UM.Theme.getSize("default_margin").width
y: UM.Theme.getSize("default_margin").height
source: UM.ActiveTool.valid ? UM.ActiveTool.activeToolPanel : ""
source: UM.Controller.valid ? UM.Controller.activeToolPanel : ""
enabled: UM.Controller.toolsEnabled
}
}
@ -222,7 +222,7 @@ Item
UM.Label
{
id: toolHint
text: UM.ActiveTool.properties.getValue("ToolHint") != undefined ? UM.ActiveTool.properties.getValue("ToolHint") : ""
text: UM.Controller.properties.getValue("ToolHint") != undefined ? UM.ActiveTool.properties.getValue("ToolHint") : ""
color: UM.Theme.getColor("tooltip_text")
anchors.horizontalCenter: parent.horizontalCenter
}