mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 21:09:00 +08:00
Updating profile now also works in profile page
CURA-1585
This commit is contained in:
parent
d1d60e27cc
commit
fdbd6d7c5f
@ -29,14 +29,14 @@ UM.ManagementPage
|
|||||||
|
|
||||||
onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id)
|
onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id)
|
||||||
onAddObject: {
|
onAddObject: {
|
||||||
var selectedProfile;
|
var selectedContainer;
|
||||||
if (objectList.currentIndex == 0) {
|
if (objectList.currentIndex == 0) {
|
||||||
// Current settings
|
// Current settings
|
||||||
selectedProfile = UM.MachineManager.createProfile();
|
selectedContainer = Cura.MachineManager.convertUserContainerToQuality();
|
||||||
} else {
|
} else {
|
||||||
selectedProfile = UM.MachineManager.duplicateProfile(currentItem.name);
|
selectedContainer = Cura.MachineManager.duplicateContainer(currentItem.id);
|
||||||
}
|
}
|
||||||
base.selectProfile(selectedProfile);
|
base.selectContainer(selectedContainer);
|
||||||
|
|
||||||
renameDialog.removeWhenRejected = true;
|
renameDialog.removeWhenRejected = true;
|
||||||
renameDialog.open();
|
renameDialog.open();
|
||||||
@ -50,11 +50,11 @@ UM.ManagementPage
|
|||||||
removeEnabled: currentItem != null ? !currentItem.readOnly : false;
|
removeEnabled: currentItem != null ? !currentItem.readOnly : false;
|
||||||
renameEnabled: currentItem != null ? !currentItem.readOnly : false;
|
renameEnabled: currentItem != null ? !currentItem.readOnly : false;
|
||||||
|
|
||||||
scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(UM.MachineManager.activeMachineInstance)
|
scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
|
||||||
|
|
||||||
signal selectProfile(string name)
|
signal selectContainer(string id)
|
||||||
onSelectProfile: {
|
onSelectContainer: {
|
||||||
objectList.currentIndex = objectList.model.find("name", name);
|
objectList.currentIndex = objectList.model.find("id", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
@ -86,12 +86,12 @@ UM.ManagementPage
|
|||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: {
|
text: {
|
||||||
var profileName = UM.MachineManager.activeProfile;
|
var profileName = Cura.MachineManager.activeQualityName;
|
||||||
profileName = (profileName.length > 20) ? profileName.substring(0, 20) + '...' : profileName;
|
profileName = (profileName.length > 20) ? profileName.substring(0, 20) + '...' : profileName;
|
||||||
return catalog.i18nc("@action:button", "Update \"%1\"".arg(profileName));
|
return catalog.i18nc("@action:button", "Update \"%1\"".arg(profileName));
|
||||||
}
|
}
|
||||||
enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId)
|
enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId)
|
||||||
onClicked: UM.ActiveProfile.updateProfile()
|
onClicked: Cura.MachineManager.updateUserContainerToQuality()
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user