Determine readonly state from location in filesystem instead of a metadata property

CURA-1684
This commit is contained in:
fieldOfView 2016-06-09 13:16:23 +02:00
parent 5da3665832
commit cd803bc36e
43 changed files with 9 additions and 48 deletions

View file

@ -258,13 +258,13 @@ UM.MainWindow
{
//Insert a separator between readonly and custom profiles
if(separatorIndex < 0 && index > 0) {
if(model.getItem(index-1).metadata.read_only != model.getItem(index).metadata.read_only) {
if(model.getItem(index-1).readOnly != model.getItem(index).readOnly) {
profileMenu.insertSeparator(index);
separatorIndex = index;
}
}
//Because of the separator, custom profiles move one index lower
profileMenu.insertItem((model.getItem(index).metadata.read_only) ? index : index + 1, object.item);
profileMenu.insertItem((model.getItem(index).readOnly) ? index : index + 1, object.item);
}
onObjectRemoved:
{