Allow to stop the clearing action

Closes #1
This commit is contained in:
Andrea Scarpino 2014-11-16 10:24:24 +01:00
parent 69187f4bc0
commit 3522f8f8b9
2 changed files with 14 additions and 1 deletions

View file

@ -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
}
}
}

View file

@ -9,4 +9,12 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainPage</name>
<message>
<location filename="../qml/pages/MainPage.qml" line="84"/>
<source>Clearing the canvas...</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>