[FancyZones editor] Fix CanvasRect not being initialized (#10163)

* Fix CanvasRect not being initialized

* No need to use workArea height if it's set in CanvasLayoutModel
This commit is contained in:
Ivan Stošić
2021-03-11 10:50:53 +01:00
committed by GitHub
parent 72da703f0e
commit 488ee19f93
3 changed files with 11 additions and 2 deletions

View File

@@ -304,7 +304,8 @@ namespace FancyZonesEditor
}
else
{
CanvasLayoutModel canvasModel = new CanvasLayoutModel(LayoutNameText.Text, LayoutType.Custom);
var area = App.Overlay.WorkArea;
CanvasLayoutModel canvasModel = new CanvasLayoutModel(LayoutNameText.Text, LayoutType.Custom, (int)area.Width, (int)area.Height);
canvasModel.AddZone();
selectedLayoutModel = canvasModel;
}