escape key: leave and erase => leave and hide

This commit is contained in:
abakkk 2019-03-08 12:41:38 +01:00
parent 91bb4b26a7
commit 3ebcec5a68
3 changed files with 4 additions and 3 deletions

View File

@ -168,8 +168,8 @@ var DrawingArea = new Lang.Class({
_onKeyPressed: function(actor, event) {
if (event.get_key_symbol() == Clutter.Escape) {
this.hide();
this.emitter.emit('stop-drawing');
this.erase();
return Clutter.EVENT_STOP;
} else if (this.currentElement && this.currentElement.shape == Shapes.TEXT) {
if (event.get_key_symbol() == Clutter.KEY_BackSpace) {
@ -460,6 +460,7 @@ var DrawingArea = new Lang.Class({
},
enterDrawingMode: function() {
this.show();
this.keyPressedHandler = this.connect('key-press-event', this._onKeyPressed.bind(this));
this.buttonPressedHandler = this.connect('button-press-event', this._onButtonPressed.bind(this));
this.scrollHandler = this.connect('scroll-event', this._onScroll.bind(this));

View File

@ -201,7 +201,7 @@ msgstr ""
msgid "Shift key held"
msgstr ""
msgid "Leave and erase all drawings"
msgid "Leave and hide the drawing"
msgstr ""
msgid "Escape key"

View File

@ -78,7 +78,7 @@ var OTHER_SHORTCUTS = [
{ desc: "Increment/decrement line width", shortcut: "Scroll" },
{ desc: "Select color", shortcut: "Ctrl+1...9" },
{ desc: "Select eraser", shortcut: "Shift key held" },
{ desc: "Leave and erase all drawings", shortcut: "Escape key" }
{ desc: "Leave and hide the drawing", shortcut: "Escape key" }
];
function init() {