mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:28:59 +08:00
Scroll back to top when contents of table change
Contributes to issue CURA-8686.
This commit is contained in:
parent
2a5abfdb01
commit
f22fea5f22
@ -113,7 +113,7 @@ Item
|
|||||||
{
|
{
|
||||||
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
|
// Vertical ScrollBar, styled similarly to the scrollBar in the settings panel
|
||||||
id: verticalScrollBar
|
id: verticalScrollBar
|
||||||
visible: flickableView.contentHeight > flickableView.height
|
visible: tableView.contentHeight > tableView.height
|
||||||
|
|
||||||
background: Rectangle
|
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…
x
Reference in New Issue
Block a user