mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:39:03 +08:00
Code style
This commit is contained in:
parent
ac7c1a92a5
commit
cb7a3de757
@ -101,7 +101,12 @@ UM.ManagementPage
|
|||||||
text: catalog.i18nc("@action:button", "Rename");
|
text: catalog.i18nc("@action:button", "Rename");
|
||||||
iconName: "edit-rename";
|
iconName: "edit-rename";
|
||||||
enabled: base.currentItem != null ? !base.currentItem.readOnly : false;
|
enabled: base.currentItem != null ? !base.currentItem.readOnly : false;
|
||||||
onClicked: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); }
|
onClicked:
|
||||||
|
{
|
||||||
|
renameDialog.removeWhenRejected = false;
|
||||||
|
renameDialog.open();
|
||||||
|
renameDialog.selectText();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
@ -121,10 +126,16 @@ UM.ManagementPage
|
|||||||
scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
|
scrollviewCaption: catalog.i18nc("@label %1 is printer name","Printer: %1").arg(Cura.MachineManager.activeMachineName)
|
||||||
|
|
||||||
signal showProfileNameDialog()
|
signal showProfileNameDialog()
|
||||||
onShowProfileNameDialog: { renameDialog.removeWhenRejected = true; renameDialog.open(); renameDialog.selectText(); }
|
onShowProfileNameDialog:
|
||||||
|
{
|
||||||
|
renameDialog.removeWhenRejected = true;
|
||||||
|
renameDialog.open();
|
||||||
|
renameDialog.selectText();
|
||||||
|
}
|
||||||
|
|
||||||
signal selectContainer(string name)
|
signal selectContainer(string name)
|
||||||
onSelectContainer: {
|
onSelectContainer:
|
||||||
|
{
|
||||||
objectList.currentIndex = objectList.model.find("name", name);
|
objectList.currentIndex = objectList.model.find("name", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,8 +259,10 @@ UM.ManagementPage
|
|||||||
Cura.ContainerManager.renameQualityChanges(base.currentItem.name, newName)
|
Cura.ContainerManager.renameQualityChanges(base.currentItem.name, newName)
|
||||||
objectList.currentIndex = -1 //Reset selection.
|
objectList.currentIndex = -1 //Reset selection.
|
||||||
}
|
}
|
||||||
onRejected: {
|
onRejected:
|
||||||
if(removeWhenRejected) {
|
{
|
||||||
|
if(removeWhenRejected)
|
||||||
|
{
|
||||||
Cura.ContainerManager.removeQualityChanges(base.currentItem.name)
|
Cura.ContainerManager.removeQualityChanges(base.currentItem.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user