Core: Move LCS migration warning to Std_Open command

This commit is contained in:
wmayer
2024-12-15 16:46:03 +01:00
committed by Chris Hennes
parent a2c980f7d6
commit 8fdbdccd8f
6 changed files with 59 additions and 64 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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