Skip to content

Commit

Permalink
Fix: #1345
Browse files Browse the repository at this point in the history
Correct creation of view model was dependent on two properties being set.
  • Loading branch information
uxmal committed Jul 22, 2024
1 parent 6756c3e commit a0fed9d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/UserInterfaces/WindowsForms/Controls/MixedCodeDataControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class MixedCodeDataControl : TextView

public MixedCodeDataControl()
{
this.ProgramChanged += delegate { OnProgramChanged(); };
this.ProgramChanged += delegate { OnPropertyChanged(); };

OnProgramChanged();
OnPropertyChanged();

this.Disposed += MixedCodeDataControl_Disposed;
}
Expand Down Expand Up @@ -67,7 +67,7 @@ public Program Program
private Address addrTop;


private void OnProgramChanged()
private void OnPropertyChanged()
{
try
{
Expand All @@ -92,6 +92,12 @@ private void OnProgramChanged()
addrTop = null;
}

protected override void OnServicesChanged()
{
OnPropertyChanged();
base.OnServicesChanged();
}

private void OnTopAddressChanged()
{
if (program != null)
Expand Down

0 comments on commit a0fed9d

Please sign in to comment.