Reset menu selection without modifying the model

Contributes to CURA-853
This commit is contained in:
fieldOfView 2016-02-17 22:04:05 +01:00
parent e093c956f2
commit b8113a9740
3 changed files with 4 additions and 4 deletions

View file

@ -62,7 +62,7 @@ Item{
UM.MachineManager.setActiveProfile(model.name);
if (!model.active) {
//Selecting a profile was canceled; undo menu selection
checked = false;
profileSelectionInstantiator.model.setProperty(index, "active", false);
var activeProfileName = UM.MachineManager.activeProfile;
var activeProfileIndex = profileSelectionInstantiator.model.find("name", activeProfileName);
profileSelectionInstantiator.model.setProperty(activeProfileIndex, "active", true);