Index: DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs =================================================================== diff -u -r6969 -r6972 --- DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6969) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamPlugin.cs (.../DamPlugin.cs) (revision 6972) @@ -338,7 +338,7 @@ } /// - /// Make sure that the top item of the Navigator ("Waterschap") after translation is displayed properly. + /// Make sure that the top item of the Navigator after translation is displayed properly. /// private void UpdateNavigatorTopItem() { @@ -715,6 +715,7 @@ damProject.SaveXMLProject(damProject.ProjectFileName, damProject); damProject.SaveCalculationLogToTextFile(damProject.DamProjectData.CalculationMessages, damProject.ProjectFileName); SetProperControlsAfterCalculation(); + DataEventPublisher.DataListModified(damProject.DamProjectData.DesignCalculations); } private void SetProperControlsAfterCalculation() Index: DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs =================================================================== diff -u -r6873 -r6972 --- DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs (.../DamSpatialEditorDecorator.cs) (revision 6873) +++ DamClients/DamUI/trunk/src/Dam/Forms/DamSpatialEditorDecorator.cs (.../DamSpatialEditorDecorator.cs) (revision 6972) @@ -54,7 +54,8 @@ private FailureMechanismSystemType failureMechanismType; private int index; private bool editMode; - + private List designResults; + /// /// Constructs a DamSpatialEditorDecorator by adapting the passed spatialEditor. /// @@ -221,6 +222,7 @@ if (index > 0) { --index; + csvExportData = null; LoadLocation(); } } @@ -233,6 +235,7 @@ if (index < GeometryProbabilitiesCount - 1) { ++index; + csvExportData = null; LoadLocation(); } } @@ -389,7 +392,8 @@ // Use localCsvExportData to prevent timing issues with csvExportData being set to null with the improved DevExpress // version. So do not remove this. CsvExportData localCsvExportData = csvExportData; - if (localCsvExportData != null && (localCsvExportData.StabilityProfileName != CurrentSoilProfile.SoilProfile.Name)) + // When a single result has been selected find the proper belonging soil profile + if (localCsvExportData != null && (localCsvExportData.StabilityProfileName != CurrentSoilProfile.SoilProfile.Name)) { for (var i = 0; i < GeometryProbabilitiesCount; i++) { @@ -400,6 +404,17 @@ } } } + // When no single result is selected, see if we can find one that fits the current soil profile. + if (localCsvExportData == null && designResults != null && designResults.Count > 0) + { + for (var i = 0; i < designResults.Count; i++) + { + if (designResults[i].StabilityProfileName == CurrentSoilProfile.SoilProfile.Name) + { + csvExportData = designResults[i]; + } + } + } } /// @@ -511,6 +526,7 @@ { DataEventPublisher.OnSelectionChanged += DataEventPublisher_OnSelectionChanged; DataEventPublisher.OnAfterChange += DataEventPublisher_OnAfterChange; + DataEventPublisher.OnDataListModified+= DataEventPublisher_OnDataListModified; } private void RegisterShapes() @@ -587,6 +603,15 @@ } } + private void DataEventPublisher_OnDataListModified(object sender, PublishEventArgs e) + { + if (sender is List) + { + // When results are available make sure to fill the look up list designResults here. + designResults = (List) sender; + } + } + private void ClearPropertiesForEmptyLocation() { GeometryProbabilities = null;