From 3522f8f8b9350bc2a2869651d0894fe2d380e718 Mon Sep 17 00:00:00 2001 From: Andrea Scarpino Date: Sun, 16 Nov 2014 10:24:24 +0100 Subject: [PATCH] Allow to stop the clearing action Closes #1 --- qml/pages/MainPage.qml | 7 ++++++- translations/harbour-papocchio.ts | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/qml/pages/MainPage.qml b/qml/pages/MainPage.qml index e798841..dd3537a 100644 --- a/qml/pages/MainPage.qml +++ b/qml/pages/MainPage.qml @@ -54,6 +54,7 @@ Page { canvas.strokeStyle = defaultStrokeColor; } + // Remember the stroke/rubber size var currentLineWidth = size.value; size.value = prevLineWidth; prevLineWidth = currentLineWidth; @@ -81,7 +82,11 @@ Page { anchors.verticalCenter: parent.verticalCenter onClicked: { - canvas.clear(); + clear.execute(menu, qsTr("Clearing the canvas..."), function() { canvas.clear() }); + } + + RemorseItem { + id: clear } } } diff --git a/translations/harbour-papocchio.ts b/translations/harbour-papocchio.ts index 80d1a1a..d8c0c15 100644 --- a/translations/harbour-papocchio.ts +++ b/translations/harbour-papocchio.ts @@ -9,4 +9,12 @@ + + MainPage + + + Clearing the canvas... + + +