Fix display of inherited materials

Materials are sometimes inherited, such as for UM2E+. The activeQualityDefinitionId is the definition from which it should get its profiles, including material profiles. Likewise for activeQualityVariantId.

Contributes to issue CURA-2576.
This commit is contained in:
Ghostkeeper 2016-10-08 17:14:24 +02:00
parent 90c3a09bc0
commit 608248bec8
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -1,5 +1,5 @@
// Copyright (c) 2016 Ultimaker B.V.
// Uranium is released under the terms of the AGPLv3 or higher.
// Cura is released under the terms of the AGPLv3 or higher.
import QtQuick 2.1
import QtQuick.Controls 1.1
@ -21,10 +21,10 @@ UM.ManagementPage
var result = { "type": "material" }
if(Cura.MachineManager.filterMaterialsByMachine)
{
result.definition = Cura.MachineManager.activeDefinitionId
result.definition = Cura.MachineManager.activeQualityDefinitionId;
if(Cura.MachineManager.hasVariants)
{
result.variant = Cura.MachineManager.activeVariantId
result.variant = Cura.MachineManager.activeQualityVariantId;
}
}
else