Sort partitions by first sector.
This commit is contained in:
parent
f9cd824075
commit
3e7e9d8955
|
@ -213,6 +213,7 @@ public:
|
|||
|
||||
void append(Partition* p) override {
|
||||
m_Children.append(p);
|
||||
std::sort(m_Children.begin(), m_Children.end(), [] (const Partition *a, const Partition *b) -> bool {return a->firstSector() < b->firstSector();});
|
||||
}
|
||||
void setDevicePath(const QString& s) {
|
||||
m_DevicePath = s;
|
||||
|
|
|
@ -173,6 +173,7 @@ int PartitionTable::numPrimaries() const
|
|||
void PartitionTable::append(Partition* partition)
|
||||
{
|
||||
children().append(partition);
|
||||
std::sort(children().begin(), children().end(), [] (const Partition *a, const Partition *b) -> bool {return a->firstSector() < b->firstSector();});
|
||||
}
|
||||
|
||||
/** @param f the flag to get the name for
|
||||
|
|
Loading…
Reference in New Issue