CURA-4525 Added an option to turn on the UI elements of multi build plate

This commit is contained in:
Jack Ha 2017-11-15 17:00:19 +01:00
parent 864f417723
commit e2a663992c
5 changed files with 34 additions and 9 deletions

View file

@ -324,10 +324,10 @@ UM.MainWindow
}
}
/*
Button
{
id: openFileButton;
visible: !UM.Preferences.getValue("cura/use_multi_build_plate")
text: catalog.i18nc("@action:button","Open File");
iconSource: UM.Theme.getIcon("load")
style: UM.Theme.styles.tool_button
@ -340,12 +340,13 @@ UM.MainWindow
}
action: Cura.Actions.open;
}
*/
Button
{
id: objectsButton;
text: catalog.i18nc("@action:button","Objects");
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
text: catalog.i18nc("@action:button","Objects list");
iconSource: UM.Theme.getIcon("plus")
style: UM.Theme.styles.tool_button
tooltip: '';

View file

@ -39,7 +39,9 @@ Menu
onObjectRemoved: base.removeItem(object)
}
MenuSeparator {}
MenuSeparator {
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
}
Instantiator
{
model: Cura.BuildPlateModel
@ -48,15 +50,17 @@ Menu
onTriggered: CuraActions.setBuildPlateForSelection(Cura.BuildPlateModel.getItem(index).buildPlateNumber);
checkable: true
checked: Cura.BuildPlateModel.getItem(index).buildPlateNumber == Cura.BuildPlateModel.activeBuildPlate
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
}
onObjectAdded: base.insertItem(index, object);
onObjectRemoved: base.removeItem(object)
onObjectRemoved: base.removeItem(object);
}
MenuItem {
text: "New build plate";
onTriggered: CuraActions.setBuildPlateForSelection(Cura.BuildPlateModel.maxBuildPlate + 1);
checkable: true
checked: false
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
}
// Global actions

View file

@ -31,7 +31,9 @@ Menu
MenuSeparator {}
MenuItem { action: Cura.Actions.homeCamera; }
MenuSeparator {}
MenuSeparator {
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
}
Instantiator
{
model: Cura.BuildPlateModel
@ -41,6 +43,7 @@ Menu
checkable: true;
checked: Cura.BuildPlateModel.getItem(index).buildPlateNumber == Cura.BuildPlateModel.activeBuildPlate;
exclusiveGroup: buildPlateGroup;
visible: UM.Preferences.getValue("cura/use_multi_build_plate")
}
onObjectAdded: base.insertItem(index, object);
onObjectRemoved: base.removeItem(object)

View file

@ -454,12 +454,26 @@ UM.PreferencesPage
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should newly loaded models be arranged on the build palte?")
text: catalog.i18nc("@info:tooltip","Use multi build plate functionality (EXPERIMENTAL)")
CheckBox
{
id: useMultiBuildPlateCheckbox
text: catalog.i18nc("@option:check","Use multi build plate functionality (EXPERIMENTAL, restart)")
checked: boolCheck(UM.Preferences.getValue("cura/use_multi_build_plate"))
onCheckedChanged: UM.Preferences.setValue("cura/use_multi_build_plate", checked)
}
}
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should newly loaded models be arranged on the build plate? Used in conjunction with multi build plate (EXPERIMENTAL)")
CheckBox
{
id: arrangeOnLoadCheckbox
text: catalog.i18nc("@option:check","Arrange objects on load")
text: catalog.i18nc("@option:check","Arrange objects on load (EXPERIMENTAL)")
checked: boolCheck(UM.Preferences.getValue("cura/arrange_objects_on_load"))
onCheckedChanged: UM.Preferences.setValue("cura/arrange_objects_on_load", checked)
}