Browse Source

Changed SettingView to show custom menu items

Aleksei S 6 years ago
parent
commit
0cf46ca48e
1 changed files with 21 additions and 0 deletions
  1. 21 0
      resources/qml/Settings/SettingView.qml

+ 21 - 0
resources/qml/Settings/SettingView.qml

@@ -561,6 +561,27 @@ Item
                     visible: machineExtruderCount.properties.value > 1
                 }
 
+                Instantiator
+                {
+                    id: customMenuItems
+                    model: Cura.SidebarCustomMenuItemsModel { }
+                    MenuItem
+                    {
+                        text: model.name
+                        onTriggered:
+                        {
+                            customMenuItems.model.callMenuItemMethod(name, model.actions)
+                        }
+                    }
+                   onObjectAdded: contextMenu.insertItem(index, object)
+                   onObjectRemoved: contextMenu.removeItem(object)
+                }
+
+                MenuSeparator
+                {
+                    visible: customMenuItems.count > 0
+                }
+
                 MenuItem
                 {
                     //: Settings context menu action