From c859c2ba765ac08079b97dd2ddd6037e70eaf19a Mon Sep 17 00:00:00 2001 From: Benjamin Popp Date: Sat, 19 Jun 2021 21:44:02 -0500 Subject: [PATCH] close color picker popup when window moves --- src/HexManiac.WPF/Controls/PaletteControl.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/HexManiac.WPF/Controls/PaletteControl.xaml.cs b/src/HexManiac.WPF/Controls/PaletteControl.xaml.cs index 18056ccf..cf056659 100644 --- a/src/HexManiac.WPF/Controls/PaletteControl.xaml.cs +++ b/src/HexManiac.WPF/Controls/PaletteControl.xaml.cs @@ -100,6 +100,7 @@ namespace HavenSoft.HexManiac.WPF.Controls { swatchPopup.IsOpen = false; swatch.ResultChanged -= SwatchResultChanged; Application.Current.MainWindow.Deactivated -= AppClosePopup; + Application.Current.MainWindow.LocationChanged -= AppClosePopup; } public void SingleSelect() => ViewModel?.SingleSelect(); @@ -160,6 +161,7 @@ namespace HavenSoft.HexManiac.WPF.Controls { if (swatchPopup.IsOpen) { swatch.ResultChanged += SwatchResultChanged; Application.Current.MainWindow.Deactivated += AppClosePopup; + Application.Current.MainWindow.LocationChanged += AppClosePopup; commitTextboxChanges = true; } }