From 1772af60a20aa4efe31992c734bf5a116609aad8 Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Tue, 28 Jun 2022 17:59:15 +0200 Subject: [PATCH] [PowerRename] Clicking on regex/date&time cheatsheet item appends to Search/Replace field text (#19056) * [PowerRename] Fill Search/Replace field by clicking on regex/date&time cheatsheet items * Make ListViews item non-selectable --- src/modules/powerrename/PowerRenameUILib/MainWindow.xaml | 4 ++-- src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml index 73165b0ba3..23a0d95c7a 100644 --- a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml +++ b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml @@ -189,7 +189,7 @@ - + @@ -248,7 +248,7 @@ - + diff --git a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp index 5a09178ce8..09fe0055a2 100644 --- a/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp +++ b/src/modules/powerrename/PowerRenameUILib/MainWindow.xaml.cpp @@ -271,11 +271,15 @@ namespace winrt::PowerRenameUI::implementation void MainWindow::RegExItemClick(winrt::Windows::Foundation::IInspectable const&, winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs const& e) { auto s = e.ClickedItem().try_as(); + RegExFlyout().Hide(); + textBox_search().Text(textBox_search().Text() + s->Code()); } void MainWindow::DateTimeItemClick(winrt::Windows::Foundation::IInspectable const&, winrt::Microsoft::UI::Xaml::Controls::ItemClickEventArgs const& e) { auto s = e.ClickedItem().try_as(); + DateTimeFlyout().Hide(); + textBox_replace().Text(textBox_replace().Text() + s->Code()); } void MainWindow::button_rename_Click(winrt::Microsoft::UI::Xaml::Controls::SplitButton const&, winrt::Microsoft::UI::Xaml::Controls::SplitButtonClickEventArgs const&)