Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlm committed Dec 14, 2024
1 parent 64fb797 commit 5918038
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Consolonia.Core/Controls/ConsoloniaAccessText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ namespace Consolonia.Core.Controls
/// <summary>
/// A text block that displays a character prefixed with an underscore as an access key.
/// </summary>
public class ConsoloniaAccessText : AccessText, IDisposable
public sealed class ConsoloniaAccessText : AccessText
{
private bool _disposed;
private Run _accessRun;

public ConsoloniaAccessText()
{
this.PropertyChanged += OnPropertyChanged;
}

public void Dispose()
{
this.PropertyChanged -= OnPropertyChanged;
_disposed = true;
}

private void OnPropertyChanged(object sender, Avalonia.AvaloniaPropertyChangedEventArgs e)
{
switch (e.Property.Name)
Expand Down Expand Up @@ -64,9 +57,6 @@ private void OnPropertyChanged(object sender, Avalonia.AvaloniaPropertyChangedEv
_accessRun.TextDecorations.Clear();
}
break;

default:
break;
}
}
}
Expand Down

0 comments on commit 5918038

Please sign in to comment.