CURA-5035 Simplify selection

This commit is contained in:
Ian Paschal 2018-04-24 15:34:05 +02:00
parent dc0dcac199
commit f2301eec31
6 changed files with 11 additions and 21 deletions

View file

@ -88,22 +88,15 @@ Item
}
onClicked:
{
toolbox.viewSelection = model
switch(toolbox.viewCategory)
{
case "material":
console.log("OKAY FILTER BY AUTHOR", model.name)
toolbox.viewSelection = model.name
toolbox.viewPage = "author"
console.log(toolbox)
var name = model.name
toolbox.filterModelByProp("authors", "name", name)
toolbox.filterModelByProp("packages", "author_name", name)
console.log(toolbox)
toolbox.filterModelByProp("packages", "author_name", model.name)
break
default:
toolbox.viewSelection = model.id
toolbox.viewPage = "detail"
toolbox.filterModelByProp("authors", "name", model.author_name)
toolbox.filterModelByProp("packages", "id", model.id)
break
}