mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Merge branch 'CURA-5876-Configuration_dropdown' into ui_rework_4_0
This commit is contained in:
commit
024bf409c9
65 changed files with 759 additions and 1099 deletions
|
|
@ -21,8 +21,10 @@ UM.ManagementPage
|
|||
|
||||
function activeMachineIndex()
|
||||
{
|
||||
for(var i = 0; i < model.rowCount(); i++) {
|
||||
if (model.getItem(i).id == Cura.MachineManager.activeMachineId) {
|
||||
for(var i = 0; i < model.count; i++)
|
||||
{
|
||||
if (model.getItem(i).id == Cura.MachineManager.activeMachineId)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
@ -47,7 +49,7 @@ UM.ManagementPage
|
|||
{
|
||||
text: catalog.i18nc("@action:button", "Remove");
|
||||
iconName: "list-remove";
|
||||
enabled: base.currentItem != null && model.rowCount() > 1
|
||||
enabled: base.currentItem != null && model.count > 1
|
||||
onClicked: confirmDialog.open();
|
||||
},
|
||||
Button
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ Rectangle
|
|||
text: ""
|
||||
implicitWidth: UM.Theme.getSize("favorites_button").width
|
||||
implicitHeight: UM.Theme.getSize("favorites_button").height
|
||||
UM.RecolorImage {
|
||||
UM.RecolorImage
|
||||
{
|
||||
anchors
|
||||
{
|
||||
verticalCenter: parent.verticalCenter
|
||||
|
|
@ -63,8 +64,6 @@ Rectangle
|
|||
}
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: "black"
|
||||
source: brand_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Item
|
|||
var currentItemId = base.currentItem == null ? "" : base.currentItem.root_material_id
|
||||
search_root_id = currentItemId
|
||||
}
|
||||
for (var material_idx = 0; material_idx < genericMaterialsModel.rowCount(); material_idx++)
|
||||
for (var material_idx = 0; material_idx < genericMaterialsModel.count; material_idx++)
|
||||
{
|
||||
var material = genericMaterialsModel.getItem(material_idx)
|
||||
if (material.root_material_id == search_root_id)
|
||||
|
|
@ -72,15 +72,15 @@ Item
|
|||
return true
|
||||
}
|
||||
}
|
||||
for (var brand_idx = 0; brand_idx < materialsModel.rowCount(); brand_idx++)
|
||||
for (var brand_idx = 0; brand_idx < materialsModel.count; brand_idx++)
|
||||
{
|
||||
var brand = materialsModel.getItem(brand_idx)
|
||||
var types_model = brand.material_types
|
||||
for (var type_idx = 0; type_idx < types_model.rowCount(); type_idx++)
|
||||
for (var type_idx = 0; type_idx < types_model.count; type_idx++)
|
||||
{
|
||||
var type = types_model.getItem(type_idx)
|
||||
var colors_model = type.colors
|
||||
for (var material_idx = 0; material_idx < colors_model.rowCount(); material_idx++)
|
||||
for (var material_idx = 0; material_idx < colors_model.count; material_idx++)
|
||||
{
|
||||
var material = colors_model.getItem(material_idx)
|
||||
if (material.root_material_id == search_root_id)
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@ Rectangle
|
|||
}
|
||||
width: UM.Theme.getSize("favorites_button_icon").width
|
||||
height: UM.Theme.getSize("favorites_button_icon").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color:
|
||||
{
|
||||
if (favorite_button.hovered)
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@ Rectangle
|
|||
}
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
height: UM.Theme.getSize("standard_arrow").height
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
color: "black"
|
||||
source: material_type_section.expanded ? UM.Theme.getIcon("arrow_bottom") : UM.Theme.getIcon("arrow_left")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,21 +188,27 @@ Item
|
|||
Connections
|
||||
{
|
||||
target: qualitiesModel
|
||||
onItemsChanged: {
|
||||
onItemsChanged:
|
||||
{
|
||||
var toSelectItemName = base.currentItem == null ? "" : base.currentItem.name;
|
||||
if (newQualityNameToSelect != "") {
|
||||
if (newQualityNameToSelect != "")
|
||||
{
|
||||
toSelectItemName = newQualityNameToSelect;
|
||||
}
|
||||
|
||||
var newIdx = -1; // Default to nothing if nothing can be found
|
||||
if (toSelectItemName != "") {
|
||||
if (toSelectItemName != "")
|
||||
{
|
||||
// Select the required quality name if given
|
||||
for (var idx = 0; idx < qualitiesModel.rowCount(); ++idx) {
|
||||
for (var idx = 0; idx < qualitiesModel.count; ++idx)
|
||||
{
|
||||
var item = qualitiesModel.getItem(idx);
|
||||
if (item.name == toSelectItemName) {
|
||||
if (item.name == toSelectItemName)
|
||||
{
|
||||
// Switch to the newly created profile if needed
|
||||
newIdx = idx;
|
||||
if (base.toActivateNewQuality) {
|
||||
if (base.toActivateNewQuality)
|
||||
{
|
||||
// Activate this custom quality if required
|
||||
Cura.MachineManager.setQualityChangesGroup(item.quality_changes_group);
|
||||
}
|
||||
|
|
@ -382,9 +388,11 @@ Item
|
|||
var selectedItemName = Cura.MachineManager.activeQualityOrQualityChangesName;
|
||||
|
||||
// Select the required quality name if given
|
||||
for (var idx = 0; idx < qualitiesModel.rowCount(); idx++) {
|
||||
for (var idx = 0; idx < qualitiesModel.count; idx++)
|
||||
{
|
||||
var item = qualitiesModel.getItem(idx);
|
||||
if (item.name == selectedItemName) {
|
||||
if (item.name == selectedItemName)
|
||||
{
|
||||
currentIndex = idx;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ UM.PreferencesPage
|
|||
{
|
||||
return Qt.Unchecked
|
||||
}
|
||||
else if(definitionsModel.visibleCount == definitionsModel.rowCount(null))
|
||||
else if(definitionsModel.visibleCount == definitionsModel.count)
|
||||
{
|
||||
return Qt.Checked
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue