Fix null reference on PopupContent object
- Make base explicitly call to virtual function after content load - Remove debugging color, switch back to expected - White
This commit is contained in:
parent
39e8d67327
commit
63894551f9
1 changed files with 9 additions and 5 deletions
|
|
@ -91,14 +91,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
}
|
||||
|
||||
public override void ShowPopup()
|
||||
protected override void BeforeShowPopup()
|
||||
{
|
||||
if (this.PopupContent.BackgroundColor == RGBA_Bytes.Transparent)
|
||||
{
|
||||
this.PopupContent.BackgroundColor = RGBA_Bytes.Blue;
|
||||
this.PopupContent.BackgroundColor = RGBA_Bytes.White;
|
||||
}
|
||||
|
||||
base.ShowPopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +147,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
base.OnMouseUp(mouseEvent);
|
||||
}
|
||||
|
||||
public virtual void ShowPopup()
|
||||
public void ShowPopup()
|
||||
{
|
||||
menuVisible = true;
|
||||
|
||||
|
|
@ -165,6 +163,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
return;
|
||||
}
|
||||
|
||||
this.BeforeShowPopup();
|
||||
|
||||
popupWidget = new PopupWidget(this.PopupContent, this, Vector2.Zero, this.PopDirection, 0, this.AlignToRightEdge)
|
||||
{
|
||||
BorderWidth = 1,
|
||||
|
|
@ -178,5 +178,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
};
|
||||
popupWidget.Focus();
|
||||
}
|
||||
|
||||
protected virtual void BeforeShowPopup()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue