mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Repair globalPropertyProvider for per-object settings panel
Otherwise we can't find the correct limit_to_extruder property. Contributes to issue CURA-4186.
This commit is contained in:
parent
b20711ef7c
commit
a44eb0152d
1 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2016 Ultimaker B.V.
|
// Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Uranium is released under the terms of the AGPLv3 or higher.
|
// Uranium is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.2
|
import QtQuick 2.2
|
||||||
|
@ -38,6 +38,7 @@ Item {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: UM.Theme.getSize("setting").width + UM.Theme.getSize("setting").height
|
width: UM.Theme.getSize("setting").width + UM.Theme.getSize("setting").height
|
||||||
style: UM.Theme.styles.scrollview
|
style: UM.Theme.styles.scrollview
|
||||||
|
|
||||||
ListView
|
ListView
|
||||||
{
|
{
|
||||||
id: contents
|
id: contents
|
||||||
|
@ -66,6 +67,7 @@ Item {
|
||||||
property var definition: model
|
property var definition: model
|
||||||
property var settingDefinitionsModel: addedSettingsModel
|
property var settingDefinitionsModel: addedSettingsModel
|
||||||
property var propertyProvider: provider
|
property var propertyProvider: provider
|
||||||
|
property var globalPropertyProvider: inheritStackProvider
|
||||||
|
|
||||||
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
|
//Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989
|
||||||
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,
|
//In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,
|
||||||
|
@ -143,6 +145,16 @@ Item {
|
||||||
storeIndex: 0
|
storeIndex: 0
|
||||||
removeUnusedValue: false
|
removeUnusedValue: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Specialty provider that only watches global_inherits (we cant filter on what property changed we get events
|
||||||
|
// so we bypass that to make a dedicated provider).
|
||||||
|
UM.SettingPropertyProvider
|
||||||
|
{
|
||||||
|
id: inheritStackProvider
|
||||||
|
containerStackId: Cura.MachineManager.activeMachineId
|
||||||
|
key: model.key
|
||||||
|
watchedProperties: [ "limit_to_extruder" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue