Skip to content

Commit 870e3f3

Browse files
committed
Added ProcessControl status to update parent interface status automatically upon change
1 parent 2f14341 commit 870e3f3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

HeliosFalcon/Interfaces/RTT/ConfigGenerator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public ConfigGenerator() : base(XML_NAMESPACE)
165165
{
166166
_localOptions.PropertyChanged += Child_PropertyChanged;
167167
_networkOptions.PropertyChanged += Child_PropertyChanged;
168+
_processControl.PropertyChanged += Child_PropertyChanged;
168169
}
169170

170171
internal void Update(IEnumerable<ShadowVisual> viewports)
@@ -787,6 +788,17 @@ public ProcessControl ProcessControl
787788
ProcessControl oldValue = _processControl;
788789
_processControl = value;
789790
OnPropertyChanged(nameof(ProcessControl), oldValue, value, true);
791+
792+
// bubble up child property events only for the current object
793+
if (null != oldValue)
794+
{
795+
oldValue.PropertyChanged -= Child_PropertyChanged;
796+
}
797+
798+
if (null != value)
799+
{
800+
value.PropertyChanged += Child_PropertyChanged;
801+
}
790802
}
791803
}
792804

0 commit comments

Comments
 (0)