[FZ Editor] Update the small layout preview after canceling zone editing. (#9391)
This commit is contained in:
parent
f309f48ae2
commit
612f3e20ac
|
@ -31,25 +31,17 @@ namespace FancyZonesEditor
|
|||
|
||||
App.FancyZonesEditorIO.SerializeZoneSettings();
|
||||
|
||||
_backToLayoutPicker = false;
|
||||
Close();
|
||||
mainEditor.CloseEditor();
|
||||
}
|
||||
|
||||
protected void OnClosed(object sender, EventArgs e)
|
||||
{
|
||||
if (_backToLayoutPicker)
|
||||
{
|
||||
App.Overlay.CloseEditor();
|
||||
}
|
||||
App.Overlay.CloseEditor();
|
||||
}
|
||||
|
||||
protected void OnCancel(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_backToLayoutPicker = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private bool _backToLayoutPicker = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,6 +91,10 @@ namespace FancyZonesEditor.Models
|
|||
{
|
||||
_topLeft = DefaultOffset;
|
||||
}
|
||||
else if (_topLeft == Zones[Zones.Count - 1].X)
|
||||
{
|
||||
_topLeft += OffsetShift;
|
||||
}
|
||||
|
||||
Rect workingArea = App.Overlay.WorkArea;
|
||||
int topLeft = (int)App.Overlay.ScaleCoordinateWithCurrentMonitorDpi(_topLeft);
|
||||
|
@ -155,7 +159,9 @@ namespace FancyZonesEditor.Models
|
|||
other.Zones.Add(zone);
|
||||
}
|
||||
|
||||
other._topLeft = _topLeft;
|
||||
other.SensitivityRadius = SensitivityRadius;
|
||||
other.UpdateLayout();
|
||||
}
|
||||
|
||||
// PersistData
|
||||
|
|
|
@ -263,6 +263,8 @@ namespace FancyZonesEditor.Models
|
|||
layout.ShowSpacing = ShowSpacing;
|
||||
layout.Spacing = Spacing;
|
||||
layout.SensitivityRadius = SensitivityRadius;
|
||||
|
||||
layout.FirePropertyChanged();
|
||||
}
|
||||
|
||||
// InitTemplateZones
|
||||
|
|
Loading…
Reference in a new issue