Fix height of expandable component adapting to contents

Since the children don't adjust their height based on if they are visible (which would cause a binding loop) we just need to adjust the height of the total menu based on which children are visible. Easy enough.

Contributes to issue CURA-5876.
This commit is contained in:
Ghostkeeper 2018-12-07 12:59:51 +01:00
parent 05b32548f3
commit dfe55b8f23
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -139,7 +139,19 @@ Cura.ExpandableComponent
Item
{
width: parent.width
height: childrenRect.height
height:
{
var height = 0;
if(autoConfiguration.visible)
{
height += autoConfiguration.height;
}
if(customConfiguration.visible)
{
height += customConfiguration.height;
}
return height;
}
AutoConfiguration
{
id: autoConfiguration