CURA-5254 Keep track of the latest manual entry key, so it is then

selected in the list.
This commit is contained in:
Diego Prado Gesto 2018-05-22 12:05:33 +02:00
parent 74a7452333
commit eea9b7ab46
3 changed files with 25 additions and 2 deletions

View file

@ -158,7 +158,10 @@ Cura.MachineAction
model: manager.foundDevices
onModelChanged:
{
var selectedKey = manager.getStoredKey();
var selectedKey = manager.getLastManualEntryKey()
// If there is no last manual entry key, then we select the stored key (if any)
if (selectedKey == "")
selectedKey = manager.getStoredKey()
for(var i = 0; i < model.length; i++) {
if(model[i].key == selectedKey)
{