From f3efb5a7e8c8f8bcf65d1552e0dd56b05c4217cb Mon Sep 17 00:00:00 2001 From: Vincent Belpois Date: Mon, 13 Jan 2025 10:55:32 +0100 Subject: [PATCH] Fix missing constrain type in type2str --- src/Mod/Sketcher/App/Constraint.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/Constraint.h b/src/Mod/Sketcher/App/Constraint.h index fdece4dc50..4047a238a8 100644 --- a/src/Mod/Sketcher/App/Constraint.h +++ b/src/Mod/Sketcher/App/Constraint.h @@ -39,7 +39,7 @@ namespace Sketcher Important note: New constraint types must be always added at the end but before 'NumConstraintTypes'. This is mandatory in order to keep the handling of constraint types upward compatible which means that this program version ignores later introduced constraint types when - reading them from a project file. + reading them from a project file. They also must be added to the 'type2str' array in this file. */ enum ConstraintType : int { @@ -168,8 +168,10 @@ private: private: double Value; + // clang-format off constexpr static std::array type2str { {"None", + "Coincident", "Horizontal", "Vertical", "Parallel", @@ -188,6 +190,7 @@ private: "Block", "Diameter", "Weight"}}; + // clang-format on constexpr static std::array internalAlignmentType2str {{"Undef",