diff --git a/src/libs/ifc/schema.qrc b/src/libs/ifc/schema.qrc
index 62bba0903..7d322dbb9 100644
--- a/src/libs/ifc/schema.qrc
+++ b/src/libs/ifc/schema.qrc
@@ -69,6 +69,7 @@
schema/multisize_measurements/v0.4.3.xsd
schema/multisize_measurements/v0.4.4.xsd
schema/multisize_measurements/v0.5.0.xsd
+ schema/multisize_measurements/v0.5.1.xsd
schema/individual_measurements/v0.2.0.xsd
schema/individual_measurements/v0.3.0.xsd
schema/individual_measurements/v0.3.1.xsd
diff --git a/src/libs/ifc/schema/multisize_measurements/v0.5.1.xsd b/src/libs/ifc/schema/multisize_measurements/v0.5.1.xsd
new file mode 100644
index 000000000..c731036d8
--- /dev/null
+++ b/src/libs/ifc/schema/multisize_measurements/v0.5.1.xsd
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/libs/ifc/xml/vvstconverter.cpp b/src/libs/ifc/xml/vvstconverter.cpp
index 2c2cb0b7a..c90ed01c9 100644
--- a/src/libs/ifc/xml/vvstconverter.cpp
+++ b/src/libs/ifc/xml/vvstconverter.cpp
@@ -54,8 +54,8 @@
*/
const QString VVSTConverter::MeasurementMinVerStr = QStringLiteral("0.3.0");
-const QString VVSTConverter::MeasurementMaxVerStr = QStringLiteral("0.5.0");
-const QString VVSTConverter::CurrentSchema = QStringLiteral("://schema/multisize_measurements/v0.5.0.xsd");
+const QString VVSTConverter::MeasurementMaxVerStr = QStringLiteral("0.5.1");
+const QString VVSTConverter::CurrentSchema = QStringLiteral("://schema/multisize_measurements/v0.5.1.xsd");
//VVSTConverter::MeasurementMinVer; // <== DON'T FORGET TO UPDATE TOO!!!!
//VVSTConverter::MeasurementMaxVer; // <== DON'T FORGET TO UPDATE TOO!!!!
@@ -83,7 +83,8 @@ QString VVSTConverter::XSDSchema(int ver) const
std::make_pair(FORMAT_VERSION(0, 4, 2), QStringLiteral("://schema/multisize_measurements/v0.4.2.xsd")),
std::make_pair(FORMAT_VERSION(0, 4, 3), QStringLiteral("://schema/multisize_measurements/v0.4.3.xsd")),
std::make_pair(FORMAT_VERSION(0, 4, 4), QStringLiteral("://schema/multisize_measurements/v0.4.4.xsd")),
- std::make_pair(FORMAT_VERSION(0, 5, 0), CurrentSchema),
+ std::make_pair(FORMAT_VERSION(0, 5, 0), QStringLiteral("://schema/multisize_measurements/v0.5.0.xsd")),
+ std::make_pair(FORMAT_VERSION(0, 5, 1), CurrentSchema),
};
if (schemas.contains(ver))
@@ -126,6 +127,10 @@ void VVSTConverter::ApplyPatches()
ValidateXML(XSDSchema(FORMAT_VERSION(0, 5, 0)));
Q_FALLTHROUGH();
case (FORMAT_VERSION(0, 5, 0)):
+ ToV0_5_1();
+ ValidateXML(XSDSchema(FORMAT_VERSION(0, 5, 1)));
+ Q_FALLTHROUGH();
+ case (FORMAT_VERSION(0, 5, 1)):
break;
default:
InvalidVersion(m_ver);
@@ -144,7 +149,7 @@ void VVSTConverter::DowngradeToCurrentMaxVersion()
bool VVSTConverter::IsReadOnly() const
{
// Check if attribute read-only was not changed in file format
- Q_STATIC_ASSERT_X(VVSTConverter::MeasurementMaxVer == FORMAT_VERSION(0, 5, 0),
+ Q_STATIC_ASSERT_X(VVSTConverter::MeasurementMaxVer == FORMAT_VERSION(0, 5, 1),
"Check attribute read-only.");
// Possibly in future attribute read-only will change position etc.
@@ -492,3 +497,14 @@ void VVSTConverter::ToV0_5_0()
ConvertMeasurementsToV0_5_0();
Save();
}
+
+//---------------------------------------------------------------------------------------------------------------------
+void VVSTConverter::ToV0_5_1()
+{
+ // TODO. Delete if minimal supported version is 0.5.1
+ Q_STATIC_ASSERT_X(VVSTConverter::MeasurementMinVer < FORMAT_VERSION(0, 5, 1),
+ "Time to refactor the code.");
+
+ SetVersion(QStringLiteral("0.5.1"));
+ Save();
+}
diff --git a/src/libs/ifc/xml/vvstconverter.h b/src/libs/ifc/xml/vvstconverter.h
index 869679bca..5b50d9d52 100644
--- a/src/libs/ifc/xml/vvstconverter.h
+++ b/src/libs/ifc/xml/vvstconverter.h
@@ -51,10 +51,10 @@ public:
// GCC 4.6 doesn't allow constexpr and const together
#if !defined(__INTEL_COMPILER) && !defined(__clang__) && defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) <= 406
static Q_DECL_CONSTEXPR int MeasurementMinVer = FORMAT_VERSION(0, 3, 0);
- static Q_DECL_CONSTEXPR int MeasurementMaxVer = FORMAT_VERSION(0, 5, 0);
+ static Q_DECL_CONSTEXPR int MeasurementMaxVer = FORMAT_VERSION(0, 5, 1);
#else
static Q_DECL_CONSTEXPR const int MeasurementMinVer = FORMAT_VERSION(0, 3, 0);
- static Q_DECL_CONSTEXPR const int MeasurementMaxVer = FORMAT_VERSION(0, 5, 0);
+ static Q_DECL_CONSTEXPR const int MeasurementMaxVer = FORMAT_VERSION(0, 5, 1);
#endif
protected:
@@ -90,6 +90,7 @@ private:
void ToV0_4_3();
void ToV0_4_4();
void ToV0_5_0();
+ void ToV0_5_1();
};
//---------------------------------------------------------------------------------------------------------------------
diff --git a/src/libs/vformat/vmeasurements.cpp b/src/libs/vformat/vmeasurements.cpp
index d0da8a185..6eda33433 100644
--- a/src/libs/vformat/vmeasurements.cpp
+++ b/src/libs/vformat/vmeasurements.cpp
@@ -1274,7 +1274,6 @@ QDomElement VMeasurements::MakeEmpty(const QString &name, const QString &formula
if (type == MeasurementsType::Multisize)
{
SetAttribute(element, AttrBase, QChar('0'));
- SetAttribute(element, AttrShiftA, QChar('0'));
}
else
{