mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Category setting icon now becomes invible if clicked
CURA-2361
This commit is contained in:
parent
132ed1d258
commit
4f547fff8d
3 changed files with 23 additions and 4 deletions
|
@ -34,6 +34,12 @@ class SettingInheritanceManager(QObject):
|
|||
result.append(key)
|
||||
return result
|
||||
|
||||
@pyqtSlot(str)
|
||||
def manualRemoveOverride(self, key):
|
||||
if key in self._settings_with_inheritance_warning:
|
||||
self._settings_with_inheritance_warning.remove(key)
|
||||
self.settingsWithIntheritanceChanged.emit()
|
||||
|
||||
def _onActiveExtruderChanged(self):
|
||||
if self._active_container_stack:
|
||||
self._active_container_stack.propertyChanged.disconnect(self._onPropertyChanged)
|
||||
|
|
|
@ -59,7 +59,19 @@ Button {
|
|||
|
||||
visible:
|
||||
{
|
||||
return Cura.SettingInheritanceManager.settingsWithInheritanceWarning.indexOf(definition.key) >= 0;
|
||||
if(Cura.SettingInheritanceManager.settingsWithInheritanceWarning.indexOf(definition.key) >= 0)
|
||||
{
|
||||
var children_with_override = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(definition.key)
|
||||
for(var i = 0; i < children_with_override.length; i++)
|
||||
{
|
||||
if(!settingDefinitionsModel.getVisible(children_with_override[i]))
|
||||
{
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
height: parent.height / 2
|
||||
|
|
|
@ -151,11 +151,12 @@ ScrollView
|
|||
onHideTooltip: base.hideTooltip()
|
||||
onShowAllHiddenInheritedSettings:
|
||||
{
|
||||
var test = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(category_id)
|
||||
for(var i = 0; i < test.length; i++)
|
||||
var children_with_override = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(category_id)
|
||||
for(var i = 0; i < children_with_override.length; i++)
|
||||
{
|
||||
definitionsModel.setVisible(test[i], true)
|
||||
definitionsModel.setVisible(children_with_override[i], true)
|
||||
}
|
||||
Cura.SettingInheritanceManager.manualRemoveOverride(category_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue