mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Fix qml binding loops
This commit is contained in:
parent
84002a70d0
commit
6fa4dd0a97
2 changed files with 19 additions and 3 deletions
|
|
@ -188,7 +188,11 @@ Item
|
|||
Item {
|
||||
id: buttonsRow
|
||||
height: abortButton.height
|
||||
width: Math.min(childrenRect.width, base.width - 2 * UM.Theme.getSize("sidebar_margin").width)
|
||||
width: {
|
||||
// using childrenRect.width directly causes a binding loop, because setting the width affects the childrenRect
|
||||
var children_width = additionalComponentsRow.width + pauseResumeButton.width + abortButton.width + 3 * UM.Theme.getSize("default_margin").width;
|
||||
return Math.min(children_width, base.width - 2 * UM.Theme.getSize("sidebar_margin").width);
|
||||
}
|
||||
anchors.top: progressBar.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
|
||||
anchors.right: parent.right
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue