From 66afc2a391f6e8b6d62f14ea2df07627cdb76900 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 10 Mar 2017 11:02:27 +0100 Subject: [PATCH] Added new project option CURA-3494 --- resources/qml/Actions.qml | 8 ++++++++ resources/qml/Cura.qml | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 1a345deafa..f586f82a90 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -10,6 +10,7 @@ import Cura 1.0 as Cura Item { + property alias newProject: newProjectAction; property alias open: openAction; property alias loadWorkspace: loadWorkspaceAction; property alias quit: quitAction; @@ -288,6 +289,13 @@ Item shortcut: StandardKey.Open; } + Action + { + id: newProjectAction + text: catalog.i18nc("@action:inmenu menubar:file","&New Project..."); + shortcut: StandardKey.New + } + Action { id: loadWorkspaceAction diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 1d998f0fee..e8c06f4e9a 100755 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -66,6 +66,10 @@ UM.MainWindow { id: fileMenu title: catalog.i18nc("@title:menu menubar:toplevel","&File"); + MenuItem + { + action: Cura.Actions.newProject; + } MenuItem { @@ -533,6 +537,15 @@ UM.MainWindow target: Cura.Actions.preferences onTriggered: preferences.visible = true } + Connections + { + target: Cura.Actions.newProject + onTriggered: + { + Printer.deleteAll(); + Cura.Actions.resetProfile.trigger(); + } + } Connections {