mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Scroll back to top when contents of table change
Contributes to issue CURA-8686.
This commit is contained in:
parent
2a5abfdb01
commit
f22fea5f22
2 changed files with 19 additions and 1 deletions
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue