From bf03d714274ef79de916662c84b70a07aa441d69 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 4 Feb 2016 11:43:43 +0100 Subject: [PATCH] Hide setting if global-only In the per-object-setting panel, a setting is no longer displayed as settable per-object if it is global-only. Contributes to issue CURA-458. --- plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 618937b09c..e26f4cb6a8 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -202,6 +202,7 @@ Item { width: parent.width; height: childrenRect.height; + visible: model.visible && settingsColumn.height != 0 //If all children are hidden, the height is 0, and then the category header must also be hidden. ToolButton { id: categoryHeader; @@ -237,8 +238,6 @@ Item { property variant settingsModel: model.settings; - visible: model.visible; - Column { id: settingsColumn; @@ -272,6 +271,8 @@ Item { x: model.depth * UM.Theme.sizes.default_margin.width; text: model.name; tooltip: model.description; + visible: !model.global_only + height: model.global_only ? 0 : undefined onClicked: { var object_id = UM.ActiveTool.properties.Model.getItem(base.currentIndex).id;