Expression bodied property

This commit is contained in:
John Lewin 2017-09-28 23:42:43 -07:00
parent 00abcea14c
commit 5a3400a1ce

View file

@ -116,17 +116,11 @@ namespace MatterHackers.MatterControl.CustomWidgets
return imageWidget; return imageWidget;
} }
// Clamped to MinDockingWidth or value
double PageWidth double PageWidth
{ {
get get => Math.Max(MinDockingWidth, printer.ViewState.SliceSettingsWidth);
{ set => printer.ViewState.SliceSettingsWidth = Math.Max(MinDockingWidth, value);
return Math.Max(MinDockingWidth, printer.ViewState.SliceSettingsWidth);
}
set
{
var clampedWidth = Math.Max(MinDockingWidth, value);
printer.ViewState.SliceSettingsWidth = clampedWidth;
}
} }
private void Rebuild() private void Rebuild()