mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
CURA-5035 Simplify selection
This commit is contained in:
parent
dc0dcac199
commit
f2301eec31
6 changed files with 11 additions and 21 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue