diff --git a/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml b/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml index e0009d20e3..6a03bca27b 100644 --- a/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml +++ b/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml @@ -78,6 +78,11 @@ Item { manager.setSelectedFileIndices([currentRow]); } + onDoubleClicked: function(row) + { + manager.setSelectedFileIndices([row]); + openFilesButton.clicked(); + } } Label diff --git a/plugins/DigitalLibrary/resources/qml/Table.qml b/plugins/DigitalLibrary/resources/qml/Table.qml index 66144b3ea3..0ae97792dc 100644 --- a/plugins/DigitalLibrary/resources/qml/Table.qml +++ b/plugins/DigitalLibrary/resources/qml/Table.qml @@ -24,6 +24,7 @@ Item 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 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 { @@ -128,6 +129,10 @@ Item { tableScrollView.currentRow = row; //Select this row. } + onDoubleClicked: + { + tableScrollView.onDoubleClicked(row); + } } } }