CURA-5510 Add the Generic materials to the list of the bundled packages

so that they show up as installed.

Show the installed icon on those packages as well.
This commit is contained in:
Diego Prado Gesto 2018-07-17 13:49:17 +02:00
parent 0bde1487e7
commit f1379135e0
2 changed files with 219 additions and 3 deletions

View file

@ -9,8 +9,8 @@ import UM 1.1 as UM
Item
{
property int packageCount: toolbox.viewCategory == "material" ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1
property int installedPackages: toolbox.viewCategory == "material" ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0)
property int packageCount: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getTotalNumberOfPackagesByAuthor(model.id) : 1
property int installedPackages: (toolbox.viewCategory == "material" && model.type === undefined) ? toolbox.getNumberOfInstalledPackagesByAuthor(model.id) : (toolbox.isInstalled(model.id) ? 1 : 0)
height: childrenRect.height
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
Rectangle
@ -106,7 +106,7 @@ Item
case "material":
// If model has a type, it must be a package
if (model.type)
if (model.type !== undefined)
{
toolbox.viewPage = "detail"
toolbox.filterModelByProp("packages", "id", model.id)