diff options
Diffstat (limited to 'views/composer/qml/View.qml')
-rw-r--r-- | views/composer/qml/View.qml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/views/composer/qml/View.qml b/views/composer/qml/View.qml index 85e8b559..9afc5316 100644 --- a/views/composer/qml/View.qml +++ b/views/composer/qml/View.qml | |||
@@ -39,7 +39,7 @@ Kube.View { | |||
39 | htmlBody: html.checked | 39 | htmlBody: html.checked |
40 | sign: signCheckbox.checked | 40 | sign: signCheckbox.checked |
41 | encrypt: encryptCheckbox.checked | 41 | encrypt: encryptCheckbox.checked |
42 | onDone: Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) | 42 | onDone: root.done() |
43 | 43 | ||
44 | property bool foundAllKeys: composerController.to.foundAllKeys && composerController.cc.foundAllKeys && composerController.bcc.foundAllKeys | 44 | property bool foundAllKeys: composerController.to.foundAllKeys && composerController.cc.foundAllKeys && composerController.bcc.foundAllKeys |
45 | 45 | ||
@@ -55,6 +55,13 @@ Kube.View { | |||
55 | Kube.Fabric.postMessage(Kube.Messages.synchronize, {"type": "contacts"}) | 55 | Kube.Fabric.postMessage(Kube.Messages.synchronize, {"type": "contacts"}) |
56 | } | 56 | } |
57 | 57 | ||
58 | onAborted: { | ||
59 | //Avoid loosing the message | ||
60 | if (composerController.saveAsDraftAction.enabled) { | ||
61 | composerController.saveAsDraftAction.execute() | ||
62 | } | ||
63 | } | ||
64 | |||
58 | function loadMessage(message, loadType) { | 65 | function loadMessage(message, loadType) { |
59 | if (message) { | 66 | if (message) { |
60 | switch(loadType) { | 67 | switch(loadType) { |
@@ -488,7 +495,7 @@ Kube.View { | |||
488 | Kube.Button { | 495 | Kube.Button { |
489 | width: saveDraftButton.width | 496 | width: saveDraftButton.width |
490 | text: qsTr("Discard") | 497 | text: qsTr("Discard") |
491 | onClicked: Kube.Fabric.postMessage(Kube.Messages.componentDone, {}) | 498 | onClicked: root.done() |
492 | } | 499 | } |
493 | 500 | ||
494 | Kube.Button { | 501 | Kube.Button { |