Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs
===================================================================
diff -u -ra6d8f7c8868a573cb4026770119c5f997039ca2a -ra199966cb016dd5596430ada947e252d5b6b62e7
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a6d8f7c8868a573cb4026770119c5f997039ca2a)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a199966cb016dd5596430ada947e252d5b6b62e7)
@@ -326,9 +326,9 @@
///
///Wilt u doorgaan?.
///
- public static string ReferenceLineReplacementHandler_Confirm_clear_referenceLine_dependent_data {
+ public static string ReferenceLineUpdateHandler_Confirm_clear_referenceLine_dependent_data {
get {
- return ResourceManager.GetString("ReferenceLineReplacementHandler_Confirm_clear_referenceLine_dependent_data", resourceCulture);
+ return ResourceManager.GetString("ReferenceLineUpdateHandler_Confirm_clear_referenceLine_dependent_data", resourceCulture);
}
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx
===================================================================
diff -u -ra6d8f7c8868a573cb4026770119c5f997039ca2a -ra199966cb016dd5596430ada947e252d5b6b62e7
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision a6d8f7c8868a573cb4026770119c5f997039ca2a)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision a199966cb016dd5596430ada947e252d5b6b62e7)
@@ -130,7 +130,7 @@
..\Resources\Foreshore.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
+
Na het importeren van een aangepaste ligging van de referentielijn zullen alle geïmporteerde en berekende gegevens van alle toetssporen worden gewist.
Wilt u doorgaan?
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj
===================================================================
diff -u -rfd01655060482fc2b2a49ca9661fb489ebdc1b80 -ra199966cb016dd5596430ada947e252d5b6b62e7
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision fd01655060482fc2b2a49ca9661fb489ebdc1b80)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Ringtoets.Integration.Plugin.csproj (.../Ringtoets.Integration.Plugin.csproj) (revision a199966cb016dd5596430ada947e252d5b6b62e7)
@@ -40,7 +40,7 @@
-
+
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs
===================================================================
diff -u -raf799c0543365c3fce39a12d2662403b61611a0b -ra199966cb016dd5596430ada947e252d5b6b62e7
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision af799c0543365c3fce39a12d2662403b61611a0b)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision a199966cb016dd5596430ada947e252d5b6b62e7)
@@ -324,7 +324,7 @@
};
yield return new PropertyInfo
{
- CreateInstance = context => new MacroStabilityOutwardsFailureMechanismProperties(context.WrappedData)
+ CreateInstance = context => new MacroStabilityOutwardsFailureMechanismProperties(context.WrappedData, context.Parent)
};
yield return new PropertyInfo
{
@@ -729,7 +729,7 @@
FileFilterGenerator = new FileFilterGenerator(RingtoetsCommonIOResources.Shape_file_filter_Extension,
RingtoetsCommonIOResources.Shape_file_filter_Description),
CreateFileImporter = (context, filePath) => new ReferenceLineImporter(context.WrappedData,
- new ReferenceLineReplacementHandler(Gui.ViewCommands),
+ new ReferenceLineUpdateHandler(context.AssessmentSection, Gui.ViewCommands),
filePath)
};
@@ -740,7 +740,7 @@
Image = RingtoetsCommonFormsResources.SectionsIcon,
FileFilterGenerator = new FileFilterGenerator(RingtoetsCommonIOResources.Shape_file_filter_Extension,
RingtoetsCommonIOResources.Shape_file_filter_Description),
- IsEnabled = context => context.AssessmentSection.ReferenceLine != null,
+ IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine),
CreateFileImporter = (context, filePath) => new FailureMechanismSectionsImporter(context.WrappedData,
context.AssessmentSection.ReferenceLine,
filePath,
@@ -761,7 +761,7 @@
Category = RingtoetsCommonFormsResources.Ringtoets_Category,
Image = Resources.Foreshore,
FileFilterGenerator = CreateForeshoreProfileFileFilterGenerator,
- IsEnabled = context => context.ParentAssessmentSection.ReferenceLine != null,
+ IsEnabled = context => HasGeometry(context.ParentAssessmentSection.ReferenceLine),
VerifyUpdates = context => VerifyForeshoreProfileUpdates(context, Resources.RingtoetsPlugin_VerifyForeshoreProfileUpdates_When_importing_ForeshoreProfile_definitions_assigned_to_calculations_output_will_be_cleared_confirm)
};
}
@@ -771,8 +771,8 @@
yield return new ExportInfo
{
Name = RingtoetsCommonDataResources.ReferenceLine_DisplayName,
- CreateFileExporter = (context, filePath) => new ReferenceLineExporter(context.WrappedData.ReferenceLine, context.WrappedData.Id, filePath),
- IsEnabled = context => context.WrappedData.ReferenceLine != null,
+ CreateFileExporter = (context, filePath) => new ReferenceLineExporter(context.WrappedData, context.AssessmentSection.Id, filePath),
+ IsEnabled = context => HasGeometry(context.AssessmentSection.ReferenceLine),
FileFilterGenerator = new FileFilterGenerator(RingtoetsCommonIOResources.Shape_file_filter_Extension,
RingtoetsCommonIOResources.Shape_file_filter_Description)
};
@@ -790,7 +790,7 @@
{
Name = RingtoetsCommonFormsResources.AssemblyResult_DisplayName,
CreateFileExporter = (context, filePath) => new AssemblyExporter(context.WrappedData, filePath),
- IsEnabled = context => context.WrappedData.ReferenceLine != null,
+ IsEnabled = context => HasGeometry(context.WrappedData.ReferenceLine),
FileFilterGenerator = new FileFilterGenerator(Resources.AssemblyResult_file_filter_Extension,
RingtoetsCommonFormsResources.AssemblyResult_DisplayName)
};
@@ -911,9 +911,9 @@
{
Text = context => RingtoetsCommonDataResources.ReferenceLine_DisplayName,
Image = context => RingtoetsCommonFormsResources.ReferenceLineIcon,
- ForeColor = context => context.WrappedData.ReferenceLine == null
- ? Color.FromKnownColor(KnownColor.GrayText)
- : Color.FromKnownColor(KnownColor.ControlText),
+ ForeColor = context => HasGeometry(context.WrappedData)
+ ? Color.FromKnownColor(KnownColor.ControlText)
+ : Color.FromKnownColor(KnownColor.GrayText),
ContextMenuStrip = ReferenceLineContextMenuStrip
};
@@ -1292,6 +1292,11 @@
}
}
+ private static bool HasGeometry(ReferenceLine referenceLine)
+ {
+ return referenceLine.Points.Any();
+ }
+
#region PropertyInfos
private static TopLevelFaultTreeIllustrationPointProperties CreateTopLevelFaultTreeIllustrationPointProperties(SelectedTopLevelFaultTreeIllustrationPoint point)
@@ -1674,7 +1679,7 @@
{
var childNodes = new List