From e8772751e6849e66d69e3881773b45e01adf1593 Mon Sep 17 00:00:00 2001 From: WandererFan Date: Mon, 30 Sep 2024 12:20:47 -0400 Subject: [PATCH] [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 --- src/Mod/TechDraw/App/DrawViewDimension.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawViewDimension.cpp b/src/Mod/TechDraw/App/DrawViewDimension.cpp index 3ee1a217c0..7f0b1a53b0 100644 --- a/src/Mod/TechDraw/App/DrawViewDimension.cpp +++ b/src/Mod/TechDraw/App/DrawViewDimension.cpp @@ -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