Merge pull request #4355 from jlewin/master
Ensure OffsetChanged event fires if unset
This commit is contained in:
commit
a93691aeb5
2 changed files with 3 additions and 3 deletions
|
|
@ -36,7 +36,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public class NozzleOffsetTemplateWidget : FlowLayoutWidget
|
||||
{
|
||||
private double _activeOffset;
|
||||
private double? _activeOffset = null;
|
||||
private ThemeConfig theme;
|
||||
|
||||
public event EventHandler OffsetChanged;
|
||||
|
|
@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public double ActiveOffset
|
||||
{
|
||||
get => _activeOffset;
|
||||
get => _activeOffset ?? 0;
|
||||
set
|
||||
{
|
||||
if (value != _activeOffset)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
_image = new ImageBuffer(16, 16);
|
||||
|
||||
this.HighlightRegion.AddChild(imageWidget = new ImageWidget(this.Image)
|
||||
this.HighlightRegion.AddChild(imageWidget = new ImageWidget(this.Image, listenForImageChanged: false)
|
||||
{
|
||||
VAnchor = VAnchor.Center,
|
||||
Margin = new BorderDouble(right: 4),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue