Commit c45174bc authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Region Selector] Handle enter key (on numpad) as well

Keys.onReturnPressed is only the return key, while the enter key on the numpad is Keys.onEnterPressed.

REVIEW: 128054
parent ea39cacb
......@@ -45,11 +45,7 @@ Item {
cropDisplayCanvas.requestPaint();
}
// key handlers
focus: true;
Keys.onReturnPressed: {
function accept() {
if (selection) {
acceptImage(selection.x, selection.y, selection.width, selection.height);
} else {
......@@ -57,6 +53,13 @@ Item {
}
}
// key handlers
focus: true;
Keys.onReturnPressed: accept()
Keys.onEnterPressed: accept()
Keys.onEscapePressed: {
cancelImage();
}
......@@ -252,9 +255,7 @@ Item {
drawCanvas: cropDisplayCanvas;
imageElement: imageBackground;
onDoubleClicked: {
editorRoot.acceptImage(selection.x, selection.y, selection.width, selection.height);
}
onDoubleClicked: editorRoot.accept()
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment