[FZEditor]Don't automatically apply a layout after editing

* "save" instead of "save and apply"

* fire property change
This commit is contained in:
Seraphima Zykova 2023-11-21 16:03:12 +01:00 committed by GitHub
parent afa72846b1
commit 06806ae283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 12 deletions

View File

@ -74,8 +74,8 @@
TabIndex="2" />
<Button
HorizontalAlignment="Stretch"
Click="OnSaveApplyTemplate"
Content="{x:Static props:Resources.Save_Apply}"
Click="OnSave"
Content="{x:Static props:Resources.Save}"
Style="{StaticResource AccentButtonStyle}"
TabIndex="1" />
</Grid>

View File

@ -18,7 +18,7 @@ namespace FancyZonesEditor
EditingLayout = editingLayout;
}
protected void OnSaveApplyTemplate(object sender, RoutedEventArgs e)
protected void OnSave(object sender, RoutedEventArgs e)
{
Logger.LogTrace();
@ -31,15 +31,8 @@ namespace FancyZonesEditor
EditingLayout.Persist();
MainWindowSettingsModel settings = ((App)Application.Current).MainWindowSettings;
settings.SetAppliedModel(EditingLayout);
App.Overlay.Monitors[App.Overlay.CurrentDesktop].SetLayoutSettings(EditingLayout);
App.FancyZonesEditorIO.SerializeLayoutTemplates();
App.FancyZonesEditorIO.SerializeCustomLayouts();
App.FancyZonesEditorIO.SerializeAppliedLayouts();
App.FancyZonesEditorIO.SerializeDefaultLayouts();
App.FancyZonesEditorIO.SerializeLayoutHotkeys();
Close();
}

View File

@ -72,8 +72,8 @@
TabIndex="1" />
<Button
HorizontalAlignment="Stretch"
Click="OnSaveApplyTemplate"
Content="{x:Static props:Resources.Save_Apply}"
Click="OnSave"
Content="{x:Static props:Resources.Save}"
Style="{StaticResource AccentButtonStyle}"
TabIndex="0" />
</Grid>

View File

@ -377,6 +377,7 @@ namespace FancyZonesEditor.Models
public void Persist()
{
PersistData();
FirePropertyChanged(nameof(PersistData));
}
public void LayoutHotkeys_PropertyChanged(object sender, PropertyChangedEventArgs e)