Core: Move LCS migration warning to Std_Open command
This commit is contained in:
@@ -309,8 +309,6 @@ void LocalCoordinateSystem::migrateXAxisPlacement()
|
||||
constexpr const double tolerance = 1e-5;
|
||||
auto features = OriginFeatures.getValues();
|
||||
|
||||
migrated = false;
|
||||
|
||||
const auto& setupData = getSetupData();
|
||||
for (auto* obj : features) {
|
||||
auto* feature = dynamic_cast <App::DatumElement*> (obj);
|
||||
@@ -320,7 +318,7 @@ void LocalCoordinateSystem::migrateXAxisPlacement()
|
||||
if (std::strcmp(feature->Role.getValue(), data.role) == 0) {
|
||||
if (!feature->Placement.getValue().getRotation().isSame(data.rot, tolerance)) {
|
||||
feature->Placement.setValue(Base::Placement(Base::Vector3d(), data.rot));
|
||||
migrated = true;
|
||||
getDocument()->setStatus(App::Document::MigrateLCS, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -200,13 +200,11 @@ public:
|
||||
virtual bool isOrigin()
|
||||
{
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
// Axis links
|
||||
PropertyLinkList OriginFeatures;
|
||||
|
||||
bool migrated;
|
||||
|
||||
protected:
|
||||
/// Checks integrity of the LCS
|
||||
App::DocumentObjectExecReturn* execute() override;
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
LinkStampChanged = 11, // Indicates during restore time if any linked document's time stamp has changed
|
||||
IgnoreErrorOnRecompute = 12, // Don't report errors if the recompute failed
|
||||
RecomputeOnRestore = 13, // Mark pending recompute on restore for migration purposes
|
||||
MigrateLCS = 14 // Migrate local coordinate system of older versions
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user