[FancyZones Editor] Prevent opening content dialog twice (#13621)

This commit is contained in:
Seraphima Zykova 2021-10-05 12:55:23 +03:00 committed by GitHub
parent cf2ec690db
commit bec0dc3c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,12 @@ namespace FancyZonesEditor
private async void NewLayoutButton_Click(object sender, RoutedEventArgs e)
{
if (_openedDialog != null)
{
// another dialog already opened
return;
}
string defaultNamePrefix = FancyZonesEditor.Properties.Resources.Default_Custom_Layout_Name;
int maxCustomIndex = 0;
foreach (LayoutModel customModel in MainWindowSettingsModel.CustomModels)