close color picker popup when window moves

This commit is contained in:
Benjamin Popp 2021-06-19 21:44:02 -05:00
parent be7c4cc033
commit c859c2ba76

View File

@ -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;
}
}