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

@ -64,18 +64,15 @@ Item
anchors.fill: parent
onClicked:
{
toolbox.viewSelection = model
switch(toolbox.viewCategory)
{
case "material":
toolbox.viewSelection = model.name
toolbox.viewPage = "author"
toolbox.filterModelByProp("authors", "name", model.name)
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
}