Просмотр исходного кода

Introduce a "Manage Materials" action

Contributes to CURA-342
Arjen Hiemstra 8 лет назад
Родитель
Сommit
1a56da464c
2 измененных файлов с 19 добавлено и 0 удалено
  1. 9 0
      resources/qml/Actions.qml
  2. 10 0
      resources/qml/Cura.qml

+ 9 - 0
resources/qml/Actions.qml

@@ -39,6 +39,8 @@ Item
     property alias resetProfile: resetProfileAction;
     property alias manageProfiles: manageProfilesAction;
 
+    property alias manageMaterials: manageMaterialsAction;
+
     property alias preferences: preferencesAction;
 
     property alias showEngineLog: showEngineLogAction;
@@ -107,6 +109,13 @@ Item
         iconName: "configure";
     }
 
+    Action
+    {
+        id: manageMaterialsAction
+        text: catalog.i18nc("@action:inmenu", "Manage Materials...")
+        iconName: "configure"
+    }
+
     Action
     {
         id: updateProfileAction;

+ 10 - 0
resources/qml/Cura.qml

@@ -582,6 +582,16 @@ UM.MainWindow
         }
     }
 
+    Connections
+    {
+        target: Cura.Actions.manageMaterials
+        onTriggered:
+        {
+            preferences.visible = true;
+            preferences.setPage(3)
+        }
+    }
+
     Connections
     {
         target: Cura.Actions.configureSettingVisibility