Browse Source

Merge pull request #1036 from arkpar/mix_ux

Mix: Ctrl+C/Cmd+C to copy data from debug panes
cl-refactor
Gav Wood 10 years ago
parent
commit
e080feb1aa
  1. 11
      mix/qml/DebugInfoList.qml
  2. 4
      mix/qml/Debugger.qml

11
mix/qml/DebugInfoList.qml

@ -8,7 +8,7 @@ ColumnLayout {
property string title
property variant listModel;
property bool collapsible;
property bool enableSelection;
property bool enableSelection: false;
property real storedHeight: 0;
property Component itemDelegate
signal rowActivated(int index)
@ -116,6 +116,15 @@ ColumnLayout {
}
}
onActivated: rowActivated(row);
Keys.onPressed: {
if ((event.modifiers & Qt.ControlModifier) && event.key === Qt.Key_C && currentRow >=0 && currentRow < listModel.length) {
var str = "";
for (var i = 0; i < listModel.length; i++)
str += listModel[i] + "\n";
appContext.toClipboard(str);
}
}
TableViewColumn {
role: "modelData"
width: parent.width

4
mix/qml/Debugger.qml

@ -529,7 +529,7 @@ Rectangle {
Text {
anchors.leftMargin: 5
width: parent.width - 5
wrapMode: Text.Wrap
wrapMode: Text.NoWrap
anchors.left: parent.left
font.family: "monospace"
anchors.verticalCenter: parent.verticalCenter
@ -600,7 +600,7 @@ Rectangle {
Text {
anchors.leftMargin: 5
width: parent.width - 5
wrapMode: Text.Wrap
wrapMode: Text.NoWrap
anchors.left: parent.left
font.family: "monospace"
anchors.verticalCenter: parent.verticalCenter

Loading…
Cancel
Save