mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-17 03:00:46 +00:00
Change Profiles page and Daily Records box in right sidebar to show data for most recently used machine.
- Changed Profile::GetMachine() to find machine with latest lastImportDate when there were multiple machines in a profile. - Previously, OSCAR would shown the "first" machine in its list, without clarity about how a machine was designated "first".
This commit is contained in:
parent
abf0747b50
commit
ade32fa914
@ -941,7 +941,14 @@ Machine *Profile::GetMachine(MachineType t)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return vec[0];
|
// Find most recently imported machine
|
||||||
|
int idx = 0;
|
||||||
|
|
||||||
|
for (int i=1; i < vec.size(); i++) {
|
||||||
|
if (vec[i]->lastImported() > vec[idx]->lastImported())
|
||||||
|
idx = i;
|
||||||
|
}
|
||||||
|
return vec[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
//bool Profile::trashMachine(Machine * mach)
|
//bool Profile::trashMachine(Machine * mach)
|
||||||
|
Loading…
Reference in New Issue
Block a user