[KBM Editor] Catch UpdateLayout exceptions (#13635)

This commit is contained in:
Jaime Bernardo
2021-10-06 15:54:15 +01:00
committed by GitHub
parent 805d8d81c5
commit 68c199aa64
5 changed files with 88 additions and 11 deletions

View File

@@ -354,7 +354,14 @@ inline void CreateEditKeyboardWindowImpl(HINSTANCE hInst, KBMEditor::KeyboardMan
xamlContainer.Children().Append(header);
xamlContainer.Children().Append(helperText);
xamlContainer.Children().Append(scrollViewer);
xamlContainer.UpdateLayout();
try
{
// If a layout update has been triggered by other methods (e.g.: adapting to zoom level), this may throw an exception.
xamlContainer.UpdateLayout();
}
catch (...)
{
}
desktopSource.Content(xamlContainer);
////End XAML Island section