Fix getting contentWidth in variable width mode

Undefined seems to work fine as well though.

Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
This commit is contained in:
Ghostkeeper 2020-06-05 14:17:21 +02:00
parent 44abd08b32
commit 9404fe0fb9
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -1,4 +1,4 @@
// Copyright (c) 2018 Ultimaker B.V.
// Copyright (c) 2020 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
@ -98,7 +98,7 @@ Button
target: buttonText
property: "width"
value: button.fixedWidthMode ? button.width - button.leftPadding - button.rightPadding
: ((maximumWidth != 0 && parent.contentWidth > maximumWidth) ? maximumWidth : undefined)
: ((maximumWidth != 0 && button.contentWidth > maximumWidth) ? maximumWidth : undefined)
}
}