Fix selecting a printer from the current section when switching sections

Broken since this change: 42fc25ab09
This commit is contained in:
fieldOfView 2016-12-13 11:32:12 +01:00 committed by Ghostkeeper
parent ca20446752
commit 002605f666
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -104,8 +104,8 @@ UM.Dialog
base.activeCategory = section;
if (machineList.model.getItem(machineList.currentIndex).section != section) {
// Find the first machine from this section
for(var i = 0; i < sortedMachineDefinitionsModel.count; i++) {
var item = sortedMachineDefinitionsModel.getItem(i);
for(var i = 0; i < machineList.model.rowCount(); i++) {
var item = machineList.model.getItem(i);
if (item.section == section) {
machineList.currentIndex = i;
break;