Renaming a profile will now also reset selection

This forces an update of the display data. Fixes CURA-2164
This commit is contained in:
Jaime van Kessel 2016-08-24 13:56:51 +02:00
parent aac19c94a3
commit a177b61153

View File

@ -235,7 +235,7 @@ UM.ManagementPage
{
Cura.MachineManager.setActiveQuality(base.model.getItem(0).name)
}
objectList.currentIndex = -1 //Reset selection.
objectList.currentIndex = -1 //Reset selection.
}
}
UM.RenameDialog
@ -243,7 +243,11 @@ UM.ManagementPage
id: renameDialog;
object: base.currentItem != null ? base.currentItem.name : ""
property bool removeWhenRejected: false
onAccepted: Cura.ContainerManager.renameQualityChanges(base.currentItem.name, newName)
onAccepted:
{
Cura.ContainerManager.renameQualityChanges(base.currentItem.name, newName)
objectList.currentIndex = -1 //Reset selection.
}
onRejected: {
if(removeWhenRejected) {
Cura.ContainerManager.removeQualityChanges(base.currentItem.name)