Browse Source

Apply different filtering per category when pressing Back

Back now applies the same filters that are applied when pressing the tab buttons.

CURA-7649
Kostas Karmas 4 years ago
parent
commit
ccd4add3ef
1 changed files with 9 additions and 1 deletions
  1. 9 1
      plugins/Toolbox/resources/qml/components/ToolboxBackColumn.qml

+ 9 - 1
plugins/Toolbox/resources/qml/components/ToolboxBackColumn.qml

@@ -48,7 +48,15 @@ Item
         onClicked:
         {
             toolbox.viewPage = "overview"
-            toolbox.filterModelByProp("packages", "package_types", toolbox.viewCategory)
+            if (toolbox.viewCategory == "material")
+            {
+                toolbox.filterModelByProp("authors", "package_types", "material")
+            }
+            else if (toolbox.viewCategory == "plugin")
+            {
+                toolbox.filterModelByProp("packages", "type", "plugin")
+            }
+
         }
         style: ButtonStyle
         {