diff --git a/plugins/DigitalLibrary/resources/qml/Table.qml b/plugins/DigitalLibrary/resources/qml/Table.qml index 6eec4d4090..b6162e9135 100644 --- a/plugins/DigitalLibrary/resources/qml/Table.qml +++ b/plugins/DigitalLibrary/resources/qml/Table.qml @@ -113,7 +113,7 @@ Item { // Vertical ScrollBar, styled similarly to the scrollBar in the settings panel id: verticalScrollBar - visible: flickableView.contentHeight > flickableView.height + visible: tableView.contentHeight > tableView.height background: Rectangle { @@ -169,5 +169,14 @@ Item } } } + + Connections + { + target: model + function onRowCountChanged() + { + tableView.contentY = 0; //When the number of rows is reduced, make sure to scroll back to the start. + } + } } } \ No newline at end of file diff --git a/resources/qml/TableView.qml b/resources/qml/TableView.qml index cb4ca1fe37..079e25d717 100644 --- a/resources/qml/TableView.qml +++ b/resources/qml/TableView.qml @@ -147,5 +147,14 @@ Item } } } + + Connections + { + target: model + function onRowCountChanged() + { + tableView.contentY = 0; //When the number of rows is reduced, make sure to scroll back to the start. + } + } } } \ No newline at end of file