mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:55:57 +08:00
Allow double-clicking on a file to open it
Contributes to issue CURA-8686.
This commit is contained in:
parent
a7da4e4ef9
commit
bbb40d9b11
@ -78,6 +78,11 @@ Item
|
|||||||
{
|
{
|
||||||
manager.setSelectedFileIndices([currentRow]);
|
manager.setSelectedFileIndices([currentRow]);
|
||||||
}
|
}
|
||||||
|
onDoubleClicked: function(row)
|
||||||
|
{
|
||||||
|
manager.setSelectedFileIndices([row]);
|
||||||
|
openFilesButton.clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
@ -24,6 +24,7 @@ Item
|
|||||||
required property var columnHeaders //The text to show in the headers of each column.
|
required property var columnHeaders //The text to show in the headers of each column.
|
||||||
property alias model: tableView.model //A TableModel to display in this table. To use a ListModel for the rows, use "rows: listModel.items"
|
property alias model: tableView.model //A TableModel to display in this table. To use a ListModel for the rows, use "rows: listModel.items"
|
||||||
property int currentRow: -1 //The selected row index.
|
property int currentRow: -1 //The selected row index.
|
||||||
|
property var onDoubleClicked: function(row) {} //Something to execute when double clicked. Accepts one argument: The index of the row that was clicked on.
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
@ -128,6 +129,10 @@ Item
|
|||||||
{
|
{
|
||||||
tableScrollView.currentRow = row; //Select this row.
|
tableScrollView.currentRow = row; //Select this row.
|
||||||
}
|
}
|
||||||
|
onDoubleClicked:
|
||||||
|
{
|
||||||
|
tableScrollView.onDoubleClicked(row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user