Fix QML warning of 0 height from before table is filled

If there is no model data, the cells will be empty and would have a height of 0. The table warns us that a height of 0 is not allowed.

Contributes to issue CURA-8686.
This commit is contained in:
Ghostkeeper 2022-01-25 18:34:04 +01:00
parent 2429f28b7f
commit 39e29ae768
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -117,7 +117,7 @@ Item
delegate: Rectangle delegate: Rectangle
{ {
implicitHeight: cellContent.height implicitHeight: Math.max(1, cellContent.height)
color: UM.Theme.getColor((tableScrollView.currentRow == row) ? "primary" : ((row % 2 == 0) ? "main_background" : "viewport_background")) color: UM.Theme.getColor((tableScrollView.currentRow == row) ? "primary" : ((row % 2 == 0) ? "main_background" : "viewport_background"))