[Power Rename] Select all while filter is active (#24598)

* Check if the result from find item returns a valid item
and repopulate ExplorerItems()

* Call all the clean and populate methods only
when showRenamed is checked.
This commit is contained in:
sosssego
2023-03-17 18:13:16 +00:00
committed by GitHub
parent e6767c8e8b
commit 9d7373467d

View File

@@ -273,6 +273,13 @@ namespace winrt::PowerRenameUI::implementation
{
ToggleAll();
m_allSelected = !m_allSelected;
if (button_showRenamed().IsChecked())
{
m_explorerItems.Clear();
m_explorerItemsMap.clear();
PopulateExplorerItems();
UpdateCounts();
}
}
}
@@ -738,7 +745,8 @@ namespace winrt::PowerRenameUI::implementation
int id = 0;
spItem->GetId(&id);
auto item = FindById(id);
item.Checked(selected);
if (item)
item.Checked(selected);
}
}
UpdateCounts();