mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
51ea6779df
6 changed files with 122 additions and 88 deletions
|
@ -91,70 +91,63 @@ UM.ManagementPage
|
|||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
Row {
|
||||
id: currentSettingsActions
|
||||
visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: profileName.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Button
|
||||
{
|
||||
text: {
|
||||
var profileName = Cura.MachineManager.activeQualityName;
|
||||
profileName = (profileName.length > 20) ? profileName.substring(0, 20) + '...' : profileName;
|
||||
return catalog.i18nc("@action:button", "Update \"%1\"".arg(profileName));
|
||||
}
|
||||
enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId)
|
||||
onClicked: Cura.MachineManager.updateUserContainerToQuality()
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Discard changes");
|
||||
enabled: Cura.MachineManager.hasUserSettings
|
||||
onClicked: Cura.MachineManager.clearUserSettings();
|
||||
}
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: scrollView
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.top: currentSettingsActions.visible ? currentSettingsActions.bottom : profileName.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Column
|
||||
{
|
||||
spacing: UM.Theme.getSize("default_margin").height
|
||||
|
||||
Row
|
||||
{
|
||||
visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId
|
||||
Button
|
||||
{
|
||||
text: {
|
||||
var profileName = Cura.MachineManager.activeQualityName;
|
||||
profileName = (profileName.length > 20) ? profileName.substring(0, 20) + '...' : profileName;
|
||||
return catalog.i18nc("@action:button", "Update \"%1\"".arg(profileName));
|
||||
}
|
||||
enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId)
|
||||
onClicked: Cura.MachineManager.updateUserContainerToQuality()
|
||||
ListView {
|
||||
model: base.currentItem ? base.currentItem.settings: null
|
||||
delegate: Row {
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
Label {
|
||||
text: model.label
|
||||
elide: Text.ElideMiddle
|
||||
width: scrollView.width / 100 * 40
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Discard changes");
|
||||
enabled: Cura.MachineManager.hasUserSettings
|
||||
onClicked: Cura.MachineManager.clearUserSettings();
|
||||
Label {
|
||||
text: model.value.toString()
|
||||
}
|
||||
Label {
|
||||
text: model.unit
|
||||
}
|
||||
}
|
||||
|
||||
Grid
|
||||
{
|
||||
id: containerGrid
|
||||
columns: 2
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Label {
|
||||
text: base.currentItem == null ? "" :
|
||||
base.currentItem.id == -1 ? catalog.i18nc("@label", "Based on") : catalog.i18nc("@label", "Profile type")
|
||||
}
|
||||
Label {
|
||||
text: base.currentItem == null ? "" :
|
||||
base.currentItem.id == -1 ? Cura.MachineManager.activeQualityName:
|
||||
base.currentItem.metadata.read_only ? catalog.i18nc("@label", "Protected profile") : catalog.i18nc("@label", "Custom profile")
|
||||
}
|
||||
|
||||
Column {
|
||||
Repeater {
|
||||
model: base.currentItem ? base.currentItem.settings : null
|
||||
Label {
|
||||
text: modelData.label
|
||||
elide: Text.ElideMiddle;
|
||||
}
|
||||
}
|
||||
}
|
||||
Column {
|
||||
Repeater {
|
||||
model: base.currentItem ? base.currentItem.settings : null
|
||||
Label { text: modelData.value.toString(); }
|
||||
}
|
||||
}
|
||||
section.property: "category"
|
||||
section.criteria: ViewSection.FullString
|
||||
section.delegate: Label {
|
||||
text: section
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,19 +177,19 @@ UM.ManagementPage
|
|||
|
||||
UM.ConfirmRemoveDialog
|
||||
{
|
||||
id: confirmDialog;
|
||||
object: base.currentItem != null ? base.currentItem.name : "";
|
||||
onYes: Cura.MachineManager.removeQualityContainer(base.currentItem.id);
|
||||
id: confirmDialog
|
||||
object: base.currentItem != null ? base.currentItem.name : ""
|
||||
onYes: Cura.MachineManager.removeQualityContainer(base.currentItem.id)
|
||||
}
|
||||
UM.RenameDialog
|
||||
{
|
||||
id: renameDialog;
|
||||
object: base.currentItem != null ? base.currentItem.name : "";
|
||||
property bool removeWhenRejected: false;
|
||||
onAccepted: base.model.rename(base.currentItem.id, newName.trim());
|
||||
object: base.currentItem != null ? base.currentItem.name : ""
|
||||
property bool removeWhenRejected: false
|
||||
onAccepted: Cura.MachineManager.renameQualityContainer(base.currentItem.id, newName)
|
||||
onRejected: {
|
||||
if(removeWhenRejected) {
|
||||
base.model.removeProfile(base.currentItem.name)
|
||||
Cura.MachineManager.removeQualityContainer(base.currentItem.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ ScrollView
|
|||
{
|
||||
id: contents
|
||||
spacing: UM.Theme.getSize("default_lining").height;
|
||||
cacheBuffer: 1000000; // A huge to cache to effectively cache everything.
|
||||
cacheBuffer: 1000000; // Set a large cache to effectively just cache every list item.
|
||||
|
||||
model: UM.SettingDefinitionsModel {
|
||||
id: definitionsModel;
|
||||
|
@ -80,7 +80,7 @@ ScrollView
|
|||
{
|
||||
id: provider
|
||||
|
||||
containerStackId: Cura.ExtruderManager.activeExtruderStackId ? Cura.ExtruderManager.activeExtruderStackId : Cura.MachineManager.activeMachineId
|
||||
containerStackId: ExtruderManager.activeExtruderStackId ? ExtruderManager.activeExtruderStackId : Cura.MachineManager.activeMachineId
|
||||
key: model.key
|
||||
watchedProperties: [ "value", "enabled", "state", "validationState" ]
|
||||
storeIndex: 0
|
||||
|
|
|
@ -111,7 +111,7 @@ Item
|
|||
onClicked:
|
||||
{
|
||||
base.currentExtruderIndex = index
|
||||
Cura.ExtruderManager.setActiveExtruderIndex(index)
|
||||
ExtruderManager.setActiveExtruderIndex(index)
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue