Fixes InvalidOperationException from throwing when removing the label.

This commit is contained in:
BDisp
2021-06-06 20:52:45 +01:00
parent bbffac8f23
commit 297bf42bd6

View File

@@ -117,8 +117,14 @@ namespace UICatalog {
CanFocus = true,
};
Win.Add (removeLabel);
// This in intresting test case because `moveBtn` and below are laid out relative to this one!
removeLabel.Clicked += () => Win.Remove (removeLabel);
// This in interesting test case because `moveBtn` and below are laid out relative to this one!
removeLabel.Clicked += () => {
// Now this throw a InvalidOperationException on the TopologicalSort method as is expected.
//Win.Remove (removeLabel);
removeLabel.Visible = false;
Win.SetNeedsDisplay ();
};
var computedFrame = new FrameView ("Computed Layout") {
X = 0,