mirror of
https://github.com/nzbget/nzbget.git
synced 2026-04-25 23:36:54 -04:00
fixed #300: sorting of selected items may give wrong results
This commit is contained in:
@@ -126,7 +126,7 @@ bool GroupSorter::Execute(const char* sort)
|
||||
m_sortOrder = soDescending;
|
||||
}
|
||||
|
||||
std::sort(m_nzbList->begin(), m_nzbList->end(), *this);
|
||||
std::stable_sort(m_nzbList->begin(), m_nzbList->end(), *this);
|
||||
|
||||
if (origSortOrder == soAuto &&
|
||||
std::equal(tempList.begin(), tempList.end(), m_nzbList->begin(),
|
||||
@@ -136,7 +136,7 @@ bool GroupSorter::Execute(const char* sort)
|
||||
}))
|
||||
{
|
||||
m_sortOrder = m_sortOrder == soDescending ? soAscending : soDescending;
|
||||
std::sort(m_nzbList->begin(), m_nzbList->end(), *this);
|
||||
std::stable_sort(m_nzbList->begin(), m_nzbList->end(), *this);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user