Fix: per model settings validation

CURA-4972
This commit is contained in:
Aleksei S 2018-02-23 13:05:29 +01:00
parent 94ca4fffe3
commit ed7dec0cae
5 changed files with 108 additions and 2 deletions

View file

@ -25,7 +25,20 @@ UM.TooltipArea
onClicked:
{
addedSettingsModel.setVisible(model.key, checked);
// Important first set visible and then subscribe
// otherwise the setting is not yet in list
// For unsubscribe is important first remove the subscription and then
// set as invisible
if(checked)
{
addedSettingsModel.setVisible(model.key, checked);
UM.ActiveTool.triggerAction("subscribeForSettingValidation", model.key)
}
else
{
UM.ActiveTool.triggerAction("unsubscribeForSettingValidation", model.key)
addedSettingsModel.setVisible(model.key, checked);
}
UM.ActiveTool.forceUpdate();
}
}