aboutsummaryrefslogtreecommitdiff
path: root/qml/TerminalItem.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/TerminalItem.qml')
-rw-r--r--qml/TerminalItem.qml17
1 files changed, 15 insertions, 2 deletions
diff --git a/qml/TerminalItem.qml b/qml/TerminalItem.qml
index 0650b1e..26793da 100644
--- a/qml/TerminalItem.qml
+++ b/qml/TerminalItem.qml
@@ -8,7 +8,7 @@ Item {
property int index : 0
property EmbeddedTerminal terminal : null
- signal executed
+ signal executed (int index)
anchors {
left: parent.left
@@ -63,6 +63,19 @@ Item {
}
}
+ function reset() {
+ if ( terminal !== null ) {
+ terminal.destroy();
+
+ terminal = null;
+ command.readOnly = false;
+ command.focus = true;
+
+ unfocus();
+ select();
+ }
+ }
+
FocusScope {
id: scope
@@ -146,7 +159,7 @@ Item {
focus = false;
elementList.createTerminal(text);
- item.executed();
+ item.executed(item.index);
highlighter.deselect();
}
}