Index: DamClients/DamUI/trunk/src/Dam/Forms/DikePropertyControl.cs =================================================================== diff -u -r6759 -r6951 --- DamClients/DamUI/trunk/src/Dam/Forms/DikePropertyControl.cs (.../DikePropertyControl.cs) (revision 6759) +++ DamClients/DamUI/trunk/src/Dam/Forms/DikePropertyControl.cs (.../DikePropertyControl.cs) (revision 6951) @@ -99,23 +99,33 @@ } set { - var dike1 = value as Dike; - if (dike1 != null) + if (value is DamProjectData) { if (dike != value) { - dike = dike1; + dike = ((DamProjectData) value).Dike; + CalculationGroup.Visible = false; } } - else + else if (value is Dike) { - var dikeJob = value as DikeJob; - if ((dikeJob != null) && (dike != value)) + if (dike != value) { - dike = dikeJob.Dike; + dike = value as Dike; + CalculationGroup.Visible = false; } } - CalculationGroup.Visible = false; + else if (value is DamJob) + { + if (value is DikeJob) + { + if (dike != ((DikeJob) value).Subject) + { + dike = ((DikeJob) value).Subject as Dike; + CalculationGroup.Visible = false; + } + } + } BindSupport.Assign(this, dike); NameTextEdit.Enabled = false; } Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r6943 -r6951 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6943) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6951) @@ -443,7 +443,7 @@ dpc.BuildPropertyControlTabForTypes(damSurfaceLineControl, typeof(SurfaceLine2), typeof(CharacteristicPoint), typeof(LocationJob)); progressDelegate = dikePropertyControl.DoProgress; - dpc.BuildPropertyControlTabForTypes(dikePropertyControl, typeof(Dike), typeof(DikeJob)); + dpc.BuildPropertyControlTabForTypes(dikePropertyControl, typeof(Dike), typeof(DikeJob), typeof(DamProjectData)); dpc.BuildPropertyControlTabForTypes(damProjectCalculationSpecificationPropertyControl, typeof(DamProjectData)); dpc.BuildPropertyControlTabForTypes(designCalculationPropertyControl, typeof(CsvExportData), typeof(LocationJob)); }