[TD]Fix auto correct msg missing16892 (#16909)

* [TD]fix bad return code on auto-correct fail

* [TD]prevent changing references in property editor

- this is a "shoot yourself in the foot" practice
This commit is contained in:
WandererFan
2024-09-30 12:20:47 -04:00
committed by GitHub
parent 59be5b1757
commit e8772751e6

View File

@@ -206,6 +206,9 @@ DrawViewDimension::DrawViewDimension()
(App::Prop_None),
"Feature bounding box corners as of last reference update. Used by autocorrect");
// changing the references in the property editor will only cause problems
References2D.setStatus(App::Property::ReadOnly, true);
References3D.setStatus(App::Property::ReadOnly, true);
// hide the DrawView properties that don't apply to Dimensions
ScaleType.setStatus(App::Property::ReadOnly, true);
@@ -464,8 +467,7 @@ App::DocumentObjectExecReturn* DrawViewDimension::execute()
m_referencesCorrect = autocorrectReferences();
}
if (!m_referencesCorrect) {
m_referencesCorrect = true;
new App::DocumentObjectExecReturn("Autocorrect failed to fix broken references", this);
return new App::DocumentObjectExecReturn("Autocorrect failed to fix broken references", this);
}
// references are good, we can proceed