[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:
stefansjfw
2020-07-08 15:34:19 +02:00
committed by GitHub
parent db229cf1bf
commit 106c316442
3 changed files with 17 additions and 6 deletions

View File

@@ -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();