[FZ Editor] Hack to workaround crash (#9398)

This commit is contained in:
Enrico Giordani
2021-02-01 20:54:29 +01:00
committed by GitHub
parent 8556ccb810
commit 3d35aed95b

View File

@@ -310,10 +310,18 @@ namespace FancyZonesEditor
selectedLayoutModel.InitTemplateZones();
try
{
Hide();
}
catch
{
// See https://github.com/microsoft/PowerToys/issues/9396
Hide();
}
App.Overlay.CurrentDataContext = selectedLayoutModel;
var mainEditor = App.Overlay;
Hide();
mainEditor.OpenEditor(selectedLayoutModel);
App.Overlay.OpenEditor(selectedLayoutModel);
}
// This is required to fix a WPF rendering bug when using custom chrome