mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix per-object settings qml
This commit is contained in:
parent
50a7e8146f
commit
f85a76b4bd
2 changed files with 17 additions and 6 deletions
|
@ -165,12 +165,23 @@ Item {
|
|||
// so here we connect to the signal and update the those values.
|
||||
if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined")
|
||||
{
|
||||
addedSettingsModel.visibilityHandler.selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId");
|
||||
const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId");
|
||||
if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId)
|
||||
{
|
||||
addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId;
|
||||
}
|
||||
}
|
||||
if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined")
|
||||
{
|
||||
provider.containerStackId = UM.ActiveTool.properties.getValue("ContainerID");
|
||||
inheritStackProvider.containerStackId = UM.ActiveTool.properties.getValue("ContainerID");
|
||||
const containerId = UM.ActiveTool.properties.getValue("ContainerID");
|
||||
if (provider.containerStackId != containerId)
|
||||
{
|
||||
provider.containerStackId = containerId;
|
||||
}
|
||||
if (inheritStackProvider.containerStackId != containerId)
|
||||
{
|
||||
inheritStackProvider.containerStackId = containerId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ Item {
|
|||
{
|
||||
id: linkedSettingIcon;
|
||||
|
||||
visible: Cura.MachineManager.activeStackId != Cura.MachineManager.activeMachineId && (!definition.settable_per_extruder || globalPropertyProvider.properties.limit_to_extruder != "-1") && base.showLinkedSettingIcon
|
||||
visible: Cura.MachineManager.activeStackId != Cura.MachineManager.activeMachineId && (!definition.settable_per_extruder || String(globalPropertyProvider.properties.limit_to_extruder) != "-1") && base.showLinkedSettingIcon
|
||||
|
||||
height: parent.height;
|
||||
width: height;
|
||||
|
@ -222,7 +222,7 @@ Item {
|
|||
}
|
||||
|
||||
// If the setting does not have a limit_to_extruder property (or is -1), use the active stack.
|
||||
if(globalPropertyProvider.properties.limit_to_extruder == null || globalPropertyProvider.properties.limit_to_extruder == -1)
|
||||
if(globalPropertyProvider.properties.limit_to_extruder == null || String(globalPropertyProvider.properties.limit_to_extruder) == "-1")
|
||||
{
|
||||
return Cura.SettingInheritanceManager.settingsWithInheritanceWarning.indexOf(definition.key) >= 0;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ Item {
|
|||
// Observed when loading workspace, probably when SettingItems are removed.
|
||||
return false;
|
||||
}
|
||||
return Cura.SettingInheritanceManager.getOverridesForExtruder(definition.key, globalPropertyProvider.properties.limit_to_extruder).indexOf(definition.key) >= 0;
|
||||
return Cura.SettingInheritanceManager.getOverridesForExtruder(definition.key, String(globalPropertyProvider.properties.limit_to_extruder)).indexOf(definition.key) >= 0;
|
||||
}
|
||||
|
||||
height: parent.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue