From 2c768162da03d91e37d84210eec0b9fdc9e7e20e Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 1 Jul 2015 21:09:23 +0200 Subject: Enter insert mode when list end is hit repeatedly --- MetaTerm.qml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/MetaTerm.qml b/MetaTerm.qml index 7618594..36728ae 100644 --- a/MetaTerm.qml +++ b/MetaTerm.qml @@ -9,11 +9,16 @@ Rectangle { color: "#161616" + Component.onCompleted: terminalList.focusItem() + Flickable { id: terminalListFlickable - boundsBehavior: Flickable.StopAtBounds anchors.fill: parent + boundsBehavior: Flickable.StopAtBounds + contentHeight: terminalList.height + contentWidth: terminalList.width + Column { id: terminalList spacing: 10 @@ -40,6 +45,8 @@ Rectangle { if ( activeItem < (children.length - 1) ) { children[ activeItem].deselect(); children[++activeItem].select(); + } else { + insertTerminalAction.trigger(); } } @@ -63,9 +70,6 @@ Rectangle { onExecuted: terminalList.createItem() } } - - contentHeight: terminalList.height - contentWidth: terminalList.width } Action { @@ -114,6 +118,4 @@ Rectangle { flickable: terminalListFlickable handleSize: 10 } - - Component.onCompleted: terminalList.focusItem() } -- cgit v1.2.3