Fixed issues with the enum label losing it's number, fixed this... almost. Do not change the z-Order of the label.

This commit is contained in:
RKrom 2014-06-11 23:27:13 +02:00
parent efd144ad0d
commit 87406d90da
3 changed files with 20 additions and 5 deletions

View file

@ -53,8 +53,23 @@ namespace Greenshot.Drawing {
_stringFormat = new StringFormat();
_stringFormat.Alignment = StringAlignment.Center;
_stringFormat.LineAlignment = StringAlignment.Center;
}
}
/// <summary>
/// Make sure the StepLabel is addded to the parent after deserializing
/// by removing it from the current parent and added it to the new
/// </summary>
/// <param name="newParent"></param>
protected override void SwitchParent(Surface newParent) {
if (Parent != null) {
Parent.RemoveStepLabel(this);
}
base.SwitchParent(newParent);
if (Parent != null) {
Parent.AddStepLabel(this);
}
}
public override Size DefaultSize {
get {
return new Size(30, 30);