|
@@ -63,32 +63,20 @@ Rectangle
|
|
|
}
|
|
|
|
|
|
Component {
|
|
|
- id: objectDelegate
|
|
|
+ id: buildPlateDelegate
|
|
|
Rectangle
|
|
|
{
|
|
|
height: childrenRect.height
|
|
|
- color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
|
|
|
+ color: Cura.BuildPlateModel.getItem(index).buildPlateNumber == Cura.BuildPlateModel.activeBuildPlate ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
|
|
|
width: parent.width
|
|
|
Label
|
|
|
{
|
|
|
- id: nodeNameLabel
|
|
|
+ id: buildPlateNameLabel
|
|
|
anchors.left: parent.left
|
|
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").width - 30
|
|
|
- text: Cura.ObjectManager.getItem(index) ? Cura.ObjectManager.getItem(index).name : "";
|
|
|
- color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlightedText : (Cura.ObjectManager.getItem(index).isOutsideBuildArea ? palette.mid : palette.text)
|
|
|
- elide: Text.ElideRight
|
|
|
- }
|
|
|
-
|
|
|
- Label
|
|
|
- {
|
|
|
- id: buildPlateNumberLabel
|
|
|
- width: 20
|
|
|
- anchors.left: nodeNameLabel.right
|
|
|
- anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
|
- anchors.right: parent.right
|
|
|
- text: Cura.ObjectManager.getItem(index).buildPlateNumber != -1 ? Cura.ObjectManager.getItem(index).buildPlateNumber + 1 : "";
|
|
|
- color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlightedText : palette.text
|
|
|
+ text: Cura.BuildPlateModel.getItem(index) ? Cura.BuildPlateModel.getItem(index).name : "";
|
|
|
+ color: Cura.BuildPlateModel.activeBuildPlate == index ? palette.highlightedText : palette.text
|
|
|
elide: Text.ElideRight
|
|
|
}
|
|
|
|
|
@@ -97,19 +85,19 @@ Rectangle
|
|
|
anchors.fill: parent;
|
|
|
onClicked:
|
|
|
{
|
|
|
- Cura.ObjectManager.changeSelection(index);
|
|
|
+ Cura.BuildPlateModel.setActiveBuildPlate(index);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // list all the scene nodes
|
|
|
ScrollView
|
|
|
{
|
|
|
- id: objectsList
|
|
|
+ id: buildPlateSelection
|
|
|
frameVisible: true
|
|
|
- visible: !collapsed
|
|
|
+ height: UM.Theme.getSize("build_plate_selection_size").height
|
|
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
|
|
+ style: UM.Theme.styles.scrollview
|
|
|
|
|
|
anchors
|
|
|
{
|
|
@@ -117,7 +105,7 @@ Rectangle
|
|
|
topMargin: UM.Theme.getSize("default_margin").height;
|
|
|
left: parent.left;
|
|
|
leftMargin: UM.Theme.getSize("default_margin").height;
|
|
|
- bottom: filterBuildPlateCheckbox.top;
|
|
|
+ //bottom: objectsList.top;
|
|
|
bottomMargin: UM.Theme.getSize("default_margin").height;
|
|
|
}
|
|
|
|
|
@@ -130,49 +118,41 @@ Rectangle
|
|
|
|
|
|
ListView
|
|
|
{
|
|
|
- id: listview
|
|
|
- model: Cura.ObjectManager
|
|
|
+ id: buildPlateListView
|
|
|
+ model: Cura.BuildPlateModel
|
|
|
width: parent.width
|
|
|
- delegate: objectDelegate
|
|
|
+ delegate: buildPlateDelegate
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
- CheckBox
|
|
|
- {
|
|
|
- id: filterBuildPlateCheckbox
|
|
|
- visible: !collapsed
|
|
|
- checked: UM.Preferences.getValue("view/filter_current_build_plate")
|
|
|
- onClicked: UM.Preferences.setValue("view/filter_current_build_plate", checked)
|
|
|
-
|
|
|
- text: catalog.i18nc("@option:check","See only current build plate");
|
|
|
- style: UM.Theme.styles.checkbox;
|
|
|
-
|
|
|
- anchors
|
|
|
- {
|
|
|
- left: parent.left;
|
|
|
- topMargin: UM.Theme.getSize("default_margin").height;
|
|
|
- bottomMargin: UM.Theme.getSize("default_margin").height;
|
|
|
- leftMargin: UM.Theme.getSize("default_margin").height;
|
|
|
- bottom: buildPlateSelection.top;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
Component {
|
|
|
- id: buildPlateDelegate
|
|
|
+ id: objectDelegate
|
|
|
Rectangle
|
|
|
{
|
|
|
height: childrenRect.height
|
|
|
- color: Cura.BuildPlateModel.getItem(index).buildPlateNumber == Cura.BuildPlateModel.activeBuildPlate ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
|
|
|
+ color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlight : index % 2 ? palette.base : palette.alternateBase
|
|
|
width: parent.width
|
|
|
Label
|
|
|
{
|
|
|
- id: buildPlateNameLabel
|
|
|
+ id: nodeNameLabel
|
|
|
anchors.left: parent.left
|
|
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").width - 30
|
|
|
- text: Cura.BuildPlateModel.getItem(index) ? Cura.BuildPlateModel.getItem(index).name : "";
|
|
|
- color: Cura.BuildPlateModel.activeBuildPlate == index ? palette.highlightedText : palette.text
|
|
|
+ text: Cura.ObjectManager.getItem(index) ? Cura.ObjectManager.getItem(index).name : "";
|
|
|
+ color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlightedText : (Cura.ObjectManager.getItem(index).isOutsideBuildArea ? palette.mid : palette.text)
|
|
|
+ elide: Text.ElideRight
|
|
|
+ }
|
|
|
+
|
|
|
+ Label
|
|
|
+ {
|
|
|
+ id: buildPlateNumberLabel
|
|
|
+ width: 20
|
|
|
+ anchors.left: nodeNameLabel.right
|
|
|
+ anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
|
|
+ anchors.right: parent.right
|
|
|
+ text: Cura.ObjectManager.getItem(index).buildPlateNumber != -1 ? Cura.ObjectManager.getItem(index).buildPlateNumber + 1 : "";
|
|
|
+ color: Cura.ObjectManager.getItem(index).isSelected ? palette.highlightedText : palette.text
|
|
|
elide: Text.ElideRight
|
|
|
}
|
|
|
|
|
@@ -181,26 +161,27 @@ Rectangle
|
|
|
anchors.fill: parent;
|
|
|
onClicked:
|
|
|
{
|
|
|
- Cura.BuildPlateModel.setActiveBuildPlate(index);
|
|
|
+ Cura.ObjectManager.changeSelection(index);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // list all the scene nodes
|
|
|
ScrollView
|
|
|
{
|
|
|
- id: buildPlateSelection
|
|
|
+ id: objectsList
|
|
|
frameVisible: true
|
|
|
- height: UM.Theme.getSize("build_plate_selection_size").height
|
|
|
+ visible: !collapsed
|
|
|
width: parent.width - 2 * UM.Theme.getSize("default_margin").height
|
|
|
- style: UM.Theme.styles.scrollview
|
|
|
|
|
|
anchors
|
|
|
{
|
|
|
+ top: buildPlateSelection.bottom;
|
|
|
topMargin: UM.Theme.getSize("default_margin").height;
|
|
|
left: parent.left;
|
|
|
leftMargin: UM.Theme.getSize("default_margin").height;
|
|
|
- bottom: arrangeAllBuildPlatesButton.top;
|
|
|
+ bottom: filterBuildPlateCheckbox.top;
|
|
|
bottomMargin: UM.Theme.getSize("default_margin").height;
|
|
|
}
|
|
|
|
|
@@ -213,10 +194,31 @@ Rectangle
|
|
|
|
|
|
ListView
|
|
|
{
|
|
|
- id: buildPlateListView
|
|
|
- model: Cura.BuildPlateModel
|
|
|
+ id: listview
|
|
|
+ model: Cura.ObjectManager
|
|
|
width: parent.width
|
|
|
- delegate: buildPlateDelegate
|
|
|
+ delegate: objectDelegate
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ CheckBox
|
|
|
+ {
|
|
|
+ id: filterBuildPlateCheckbox
|
|
|
+ visible: !collapsed
|
|
|
+ checked: UM.Preferences.getValue("view/filter_current_build_plate")
|
|
|
+ onClicked: UM.Preferences.setValue("view/filter_current_build_plate", checked)
|
|
|
+
|
|
|
+ text: catalog.i18nc("@option:check","See only current build plate");
|
|
|
+ style: UM.Theme.styles.checkbox;
|
|
|
+
|
|
|
+ anchors
|
|
|
+ {
|
|
|
+ left: parent.left;
|
|
|
+ topMargin: UM.Theme.getSize("default_margin").height;
|
|
|
+ bottomMargin: UM.Theme.getSize("default_margin").height;
|
|
|
+ leftMargin: UM.Theme.getSize("default_margin").height;
|
|
|
+ bottom: arrangeAllBuildPlatesButton.top;
|
|
|
}
|
|
|
}
|
|
|
|