mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[PowerRename] Remember last window size and optimize sorting (#27978)
We don't need to sort deeper layers, because they're being enumerated using explorer API and will appear in order anyway
This commit is contained in:
@@ -102,7 +102,10 @@ HRESULT CPowerRenameEnum::_ParseEnumItems(_In_ IEnumShellItems* pesi, _In_ int d
|
||||
l->Compare(r, SICHINT_DISPLAY, &res);
|
||||
return res < 0;
|
||||
};
|
||||
std::sort(begin(items), end(items), cmpShellItems);
|
||||
|
||||
// We need to sort only the first layer, because later ones are enumerated correctly
|
||||
if (depth == 0)
|
||||
std::sort(begin(items), end(items), cmpShellItems);
|
||||
|
||||
for (const auto& item : items)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user