Index: Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs =================================================================== diff -u -rad204174e592dafca89f81a97f5a42f9f5114baf -r51d81c14322618f93a2c9cdf46276c4f2c5ee9fb --- Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (.../ObjectProperties.cs) (revision ad204174e592dafca89f81a97f5a42f9f5114baf) +++ Core/Common/src/Core.Common.Gui/PropertyBag/ObjectProperties.cs (.../ObjectProperties.cs) (revision 51d81c14322618f93a2c9cdf46276c4f2c5ee9fb) @@ -46,7 +46,7 @@ } [Browsable(false)] - public object Data + public virtual object Data { get { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationsProperties.cs =================================================================== diff -u -rad204174e592dafca89f81a97f5a42f9f5114baf -r51d81c14322618f93a2c9cdf46276c4f2c5ee9fb --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationsProperties.cs (.../HydraulicBoundaryLocationsProperties.cs) (revision ad204174e592dafca89f81a97f5a42f9f5114baf) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/HydraulicBoundaryLocationsProperties.cs (.../HydraulicBoundaryLocationsProperties.cs) (revision 51d81c14322618f93a2c9cdf46276c4f2c5ee9fb) @@ -45,14 +45,25 @@ throw new ArgumentNullException(nameof(hydraulicBoundaryLocations)); } - hydraulicBoundaryLocationObserver = new RecursiveObserver, HydraulicBoundaryLocation>(OnRefreshRequired, list => list) - { - Observable = hydraulicBoundaryLocations - }; + hydraulicBoundaryLocationObserver = new RecursiveObserver, HydraulicBoundaryLocation>(OnRefreshRequired, list => list); Data = hydraulicBoundaryLocations; } + public override object Data + { + get + { + return base.Data; + } + set + { + base.Data = value; + + hydraulicBoundaryLocationObserver.Observable = value as ObservableList; + } + } + public override void Dispose() { hydraulicBoundaryLocationObserver.Dispose(); Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PropertyClasses/DuneLocationsProperties.cs =================================================================== diff -u -rad204174e592dafca89f81a97f5a42f9f5114baf -r51d81c14322618f93a2c9cdf46276c4f2c5ee9fb --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PropertyClasses/DuneLocationsProperties.cs (.../DuneLocationsProperties.cs) (revision ad204174e592dafca89f81a97f5a42f9f5114baf) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PropertyClasses/DuneLocationsProperties.cs (.../DuneLocationsProperties.cs) (revision 51d81c14322618f93a2c9cdf46276c4f2c5ee9fb) @@ -59,16 +59,27 @@ throw new ArgumentNullException(nameof(getCalculationFunc)); } - locationObserver = new RecursiveObserver, DuneLocation>(OnRefreshRequired, list => list) - { - Observable = locations - }; + locationObserver = new RecursiveObserver, DuneLocation>(OnRefreshRequired, list => list); this.getCalculationFunc = getCalculationFunc; Data = locations; } + public override object Data + { + get + { + return base.Data; + } + set + { + base.Data = value; + + locationObserver.Observable = value as ObservableList; + } + } + [TypeConverter(typeof(ExpandableArrayConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Locations_DisplayName))]