mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-11 16:00:47 -07:00
Fix the collapsable panel of the Generic materials.
Contributes to CURA-5682.
This commit is contained in:
parent
c1ef9abf1d
commit
51b0497f84
1 changed files with 5 additions and 4 deletions
|
|
@ -158,17 +158,18 @@ Item
|
||||||
anchors.fill: generic_header
|
anchors.fill: generic_header
|
||||||
onPressed:
|
onPressed:
|
||||||
{
|
{
|
||||||
const i = base.collapsed_brands.indexOf("Generic")
|
const index = base.expanded_brands.indexOf("Generic")
|
||||||
if (i > -1)
|
|
||||||
|
if (index > -1)
|
||||||
{
|
{
|
||||||
// Remove it
|
// Remove it
|
||||||
base.collapsed_brands.splice(i, 1)
|
base.expanded_brands.splice(index, 1)
|
||||||
generic_section.expanded = false
|
generic_section.expanded = false
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Add it
|
// Add it
|
||||||
base.collapsed_brands.push("Generic")
|
base.expanded_brands.push("Generic")
|
||||||
generic_section.expanded = true
|
generic_section.expanded = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue