Merge branch 'v2_develop' into v2_drawframe-method_2983

This commit is contained in:
Tig
2023-11-16 06:16:58 -08:00
committed by GitHub
2 changed files with 11 additions and 6 deletions

View File

@@ -495,7 +495,7 @@ namespace Terminal.Gui {
protected override void Dispose (bool disposing)
{
LineCanvas.Dispose ();
Margin?.Dispose ();
Margin = null;
Border?.Dispose ();
@@ -513,8 +513,9 @@ namespace Terminal.Gui {
Remove (subview);
subview.Dispose ();
}
base.Dispose (disposing);
System.Diagnostics.Debug.Assert (InternalSubviews.Count == 0);
}
}
}

View File

@@ -1,4 +1,4 @@
namespace Terminal.Gui;
namespace Terminal.Gui;
/// <summary>
/// Represents a basic step that is displayed in a <see cref="Wizard"/>. The <see cref="WizardStep"/> view is divided horizontally in two. On the left is the
@@ -39,7 +39,7 @@ public class WizardStep : FrameView {
//private string title = string.Empty;
// The contentView works like the ContentView in FrameView.
private View contentView = new View () { Data = "WizardContentView" };
private View contentView = new View () { Id = "WizardContentView" };
/// <summary>
/// Sets or gets help text for the <see cref="WizardStep"/>.If <see cref="WizardStep.HelpText"/> is empty
@@ -185,8 +185,12 @@ public class WizardStep : FrameView {
}
SetNeedsDisplay ();
var touched = view.Frame;
contentView.Remove (view);
var container = view?.SuperView;
if (container == this) {
base.Remove (view);
} else {
container?.Remove (view);
}
if (contentView.InternalSubviews.Count < 1) {
this.CanFocus = false;