mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:39:02 +08:00
Merge branch '4.2' of github.com:Ultimaker/Cura
This commit is contained in:
commit
822181f214
@ -50,6 +50,7 @@ class ObjectsModel(ListModel):
|
||||
|
||||
Application.getInstance().getController().getScene().sceneChanged.connect(self._updateSceneDelayed)
|
||||
Application.getInstance().getPreferences().preferenceChanged.connect(self._updateDelayed)
|
||||
Selection.selectionChanged.connect(self._updateDelayed)
|
||||
|
||||
self._update_timer = QTimer()
|
||||
self._update_timer.setInterval(200)
|
||||
|
@ -105,7 +105,12 @@ Item
|
||||
// We use an extra property here, since we only want to to be informed about the content size changes.
|
||||
onContentHeightChanged:
|
||||
{
|
||||
scroll.height = Math.min(contentHeight, maximumHeight) + scroll.topPadding + scroll.bottomPadding
|
||||
// It can sometimes happen that (due to animations / updates) the contentHeight is -1.
|
||||
// This can cause a bunch of updates to trigger oneother, leading to a weird loop.
|
||||
if(contentHeight >= 0)
|
||||
{
|
||||
scroll.height = Math.min(contentHeight, maximumHeight) + scroll.topPadding + scroll.bottomPadding
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
@ -116,10 +121,15 @@ Item
|
||||
|
||||
delegate: ObjectItemButton
|
||||
{
|
||||
id: modelButton
|
||||
Binding
|
||||
{
|
||||
target: modelButton
|
||||
property: "checked"
|
||||
value: model.selected
|
||||
}
|
||||
text: model.name
|
||||
width: listView.width
|
||||
|
||||
checked: model.selected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user