mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[FancyZones] Don't create new custom layout when applying Focus layout (#4755)
* Only persist data when applying existing layout if it is scaled * Fix applying edited Focus layout * Fix different Focus zone sizes in editor and engine * Fix codestyle
This commit is contained in:
@@ -149,13 +149,14 @@ namespace FancyZonesEditor
|
||||
|
||||
if (mainEditor.DataContext is LayoutModel model)
|
||||
{
|
||||
if (model is GridLayoutModel)
|
||||
// If custom canvas layout has been scaled, persisting is needed
|
||||
if (model is CanvasLayoutModel && (model as CanvasLayoutModel).IsScaled)
|
||||
{
|
||||
model.Apply();
|
||||
model.Persist();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.Persist();
|
||||
model.Apply();
|
||||
}
|
||||
|
||||
Close();
|
||||
|
||||
Reference in New Issue
Block a user