Fixed Title event test

This commit is contained in:
Tigger Kindel
2023-03-27 14:19:53 -06:00
parent 43d5efcd6c
commit 1c5fc2d962
2 changed files with 10 additions and 5 deletions

View File

@@ -554,13 +554,17 @@ namespace Terminal.Gui {
public ustring Title {
get => title;
set {
title = value;
SetNeedsDisplay ();
if (!OnTitleChanging (title, value)) {
var old = title;
title = value;
SetNeedsDisplay ();
#if DEBUG
if (title != null && string.IsNullOrEmpty (Id)) {
Id = title.ToString ();
if (title != null && string.IsNullOrEmpty (Id)) {
Id = title.ToString ();
}
#endif // DEBUG
OnTitleChanged (old, title);
}
#endif
}
}

View File

@@ -78,6 +78,7 @@ namespace Terminal.Gui {
/// </summary>
/// <remarks>The Title is only displayed when the <see cref="Wizard"/> is used as a modal pop-up (see <see cref="Wizard.Modal"/>.</remarks>
public new ustring Title {
// BUGBUG: v2 - No need for this as View now has Title w/ notifications.
get => title;
set {
if (!OnTitleChanging (title, value)) {