mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Fix upadting list of materials when switching printers
CURA-2209
This commit is contained in:
parent
a8d8a8a7ed
commit
b004c53c6d
1 changed files with 2 additions and 10 deletions
|
@ -92,7 +92,7 @@ Menu
|
||||||
{
|
{
|
||||||
id: materialsModel
|
id: materialsModel
|
||||||
filter: materialFilter()
|
filter: materialFilter()
|
||||||
onDataChanged: populateMenuModels()
|
onModelReset: populateMenuModels()
|
||||||
}
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: group }
|
ExclusiveGroup { id: group }
|
||||||
|
@ -101,17 +101,9 @@ Menu
|
||||||
|
|
||||||
MenuItem { action: Cura.Actions.manageMaterials }
|
MenuItem { action: Cura.Actions.manageMaterials }
|
||||||
|
|
||||||
function materialFilter(brand, material)
|
function materialFilter()
|
||||||
{
|
{
|
||||||
var result = { "type": "material" };
|
var result = { "type": "material" };
|
||||||
if(brand)
|
|
||||||
{
|
|
||||||
result.brand = brand;
|
|
||||||
}
|
|
||||||
if(material)
|
|
||||||
{
|
|
||||||
result.material = material;
|
|
||||||
}
|
|
||||||
if(Cura.MachineManager.filterMaterialsByMachine)
|
if(Cura.MachineManager.filterMaterialsByMachine)
|
||||||
{
|
{
|
||||||
result.definition = Cura.MachineManager.activeDefinitionId;
|
result.definition = Cura.MachineManager.activeDefinitionId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue