mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 01:49:06 +08:00
[FZEditor]Don't automatically apply a layout after editing
* "save" instead of "save and apply" * fire property change
This commit is contained in:
parent
afa72846b1
commit
06806ae283
@ -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>
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -377,6 +377,7 @@ namespace FancyZonesEditor.Models
|
||||
public void Persist()
|
||||
{
|
||||
PersistData();
|
||||
FirePropertyChanged(nameof(PersistData));
|
||||
}
|
||||
|
||||
public void LayoutHotkeys_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user