From 9d7373467d6842aeab38b9ba78acf85e84120f61 Mon Sep 17 00:00:00 2001 From: sosssego Date: Fri, 17 Mar 2023 18:13:16 +0000 Subject: [PATCH] [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. --- .../powerrename/PowerRenameUILib/MainWindow.xaml.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp index 1331d66d1f..e520eb321f 100644 --- a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp +++ b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp @@ -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();