Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/StochasticSoilModelImporter.cs =================================================================== diff -u -r2ab087c5f7b254eb7ea6d167b122afaea10b0ff6 -r7be65c58634423d5f4e0fb5272158c716d9d3753 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision 2ab087c5f7b254eb7ea6d167b122afaea10b0ff6) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Importers/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision 7be65c58634423d5f4e0fb5272158c716d9d3753) @@ -102,8 +102,15 @@ return false; } - UpdatedInstances = modelUpdateStrategy.UpdateModelWithImportedData(ImportTarget, GetValidStochasticSoilModels(importStochasticSoilModelResult), FilePath); + StochasticSoilModel[] validStochasticSoilModels = GetValidStochasticSoilModels(importStochasticSoilModelResult).ToArray(); + if (Canceled) + { + return false; + } + NotifyProgress(messageProvider.GetAddDataToModelProgressText(), 1, 1); + UpdatedInstances = modelUpdateStrategy.UpdateModelWithImportedData(ImportTarget, validStochasticSoilModels, FilePath); + return true; } @@ -147,10 +154,14 @@ { var currentStep = 1; StochasticSoilModel[] importedModels = importStochasticSoilModelResult.Items.ToArray(); - string addDataToModelProgressText = messageProvider.GetAddDataToModelProgressText(); foreach (StochasticSoilModel importedModel in importedModels) { - NotifyProgress(addDataToModelProgressText, currentStep, importedModels.Length); + NotifyProgress(RingtoestCommonIOResources.Importer_ProgressText_Validating_imported_data, currentStep, importedModels.Length); + if (Canceled) + { + yield break; + } + if (ValidateStochasticSoilModel(importedModel)) { yield return importedModel;