mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Clean up ordering of properties in profiles page
Boyscouting; It was a bit of a mess CURA-8982
This commit is contained in:
parent
e569346750
commit
efea7c9bed
1 changed files with 31 additions and 37 deletions
|
@ -13,29 +13,17 @@ import Cura 1.6 as Cura
|
|||
UM.ManagementPage
|
||||
{
|
||||
id: base
|
||||
title: catalog.i18nc("@title:tab", "Profiles")
|
||||
|
||||
property var extrudersModel: CuraApplication.getExtrudersModel()
|
||||
property var qualityManagementModel: CuraApplication.getQualityManagementModel()
|
||||
|
||||
scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "<br><b>" + Cura.MachineManager.activeMachine.name + "</b>"
|
||||
|
||||
onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height)
|
||||
|
||||
property bool hasCurrentItem: base.currentItem != null
|
||||
hamburgerButtonVisible: hasCurrentItem
|
||||
|
||||
sectionRole: "section_name"
|
||||
property var currentItem: objectList.currentIndex == -1 ? null : base.qualityManagementModel.getItem(objectList.currentIndex)
|
||||
|
||||
property var currentItem:
|
||||
{
|
||||
var current_index = objectList.currentIndex;
|
||||
return (current_index == -1) ? null : base.qualityManagementModel.getItem(current_index);
|
||||
}
|
||||
property string currentItemName: hasCurrentItem ? base.currentItem.name : ""
|
||||
property string currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : ""
|
||||
|
||||
property var currentItemName: hasCurrentItem ? base.currentItem.name : ""
|
||||
property var currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : ""
|
||||
|
||||
property var isCurrentItemActivated:
|
||||
property bool isCurrentItemActivated:
|
||||
{
|
||||
if (!base.currentItem)
|
||||
{
|
||||
|
@ -51,7 +39,28 @@ UM.ManagementPage
|
|||
}
|
||||
}
|
||||
|
||||
property var canCreateProfile: Cura.MachineManager.hasUserSettings
|
||||
property bool canCreateProfile: Cura.MachineManager.hasUserSettings
|
||||
|
||||
signal createProfile() // Click create profile from ... in Profile context menu
|
||||
|
||||
property string newQualityNameToSelect: ""
|
||||
property bool toActivateNewQuality: false
|
||||
|
||||
onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height)
|
||||
|
||||
onCreateProfile:
|
||||
{
|
||||
createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName);
|
||||
createQualityDialog.open();
|
||||
createQualityDialog.selectText();
|
||||
}
|
||||
|
||||
title: catalog.i18nc("@title:tab", "Profiles")
|
||||
scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "<br><b>" + Cura.MachineManager.activeMachine.name + "</b>"
|
||||
|
||||
hamburgerButtonVisible: hasCurrentItem
|
||||
|
||||
sectionRole: "section_name"
|
||||
|
||||
model: qualityManagementModel
|
||||
buttons: [
|
||||
|
@ -77,18 +86,6 @@ UM.ManagementPage
|
|||
}
|
||||
]
|
||||
|
||||
// Click create profile from ... in Profile context menu
|
||||
signal createProfile()
|
||||
onCreateProfile:
|
||||
{
|
||||
createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName);
|
||||
createQualityDialog.open();
|
||||
createQualityDialog.selectText();
|
||||
}
|
||||
|
||||
property string newQualityNameToSelect: ""
|
||||
property bool toActivateNewQuality: false
|
||||
|
||||
Item
|
||||
{
|
||||
id: content_item
|
||||
|
@ -246,10 +243,7 @@ UM.ManagementPage
|
|||
id: duplicateQualityDialog
|
||||
title: catalog.i18nc("@title:window", "Duplicate Profile")
|
||||
object: "<new name>"
|
||||
onAccepted:
|
||||
{
|
||||
base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem);
|
||||
}
|
||||
onAccepted: base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem)
|
||||
}
|
||||
|
||||
// Confirmation dialog for removing a profile
|
||||
|
@ -338,9 +332,9 @@ UM.ManagementPage
|
|||
|
||||
Cura.SecondaryButton
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Discard current changes");
|
||||
text: catalog.i18nc("@action:button", "Discard current changes")
|
||||
enabled: Cura.MachineManager.hasUserSettings
|
||||
onClicked: Cura.ContainerManager.clearUserContainers();
|
||||
onClicked: Cura.ContainerManager.clearUserContainers()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -362,7 +356,7 @@ UM.ManagementPage
|
|||
UM.TabRow
|
||||
{
|
||||
id: profileExtruderTabs
|
||||
UM.TabRowButton //One extra tab for the global settings.
|
||||
UM.TabRowButton // One extra tab for the global settings.
|
||||
{
|
||||
text: catalog.i18nc("@title:tab", "Global Settings")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue