From 29066c1a5373bb6e2311806e65c61b1f6ce4170e Mon Sep 17 00:00:00 2001 From: wandererfan Date: Fri, 23 Jan 2026 19:34:32 -0500 Subject: [PATCH 1/2] [TD]fix circle centerlines line style --- src/Mod/TechDraw/Gui/CommandExtensionPack.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp index f0911eace1..f4e656db2c 100644 --- a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp +++ b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp @@ -225,6 +225,10 @@ void execCircleCenterLines(Gui::Command* cmd) _setLineAttributes(horiz); TechDraw::CosmeticEdge* vert = objFeat->getCosmeticEdge(line2tag); _setLineAttributes(vert); + // horiz & vert are centerlines, so they should use the default centerline + // number and not the number from line attributes + horiz->m_format.setLineNumber(Preferences::CenterLineStyle()); + vert->m_format.setLineNumber(Preferences::CenterLineStyle()); } } } From b8f09bd7583d61d767d275aac5c3c2143cc0120d Mon Sep 17 00:00:00 2001 From: wandererfan Date: Fri, 23 Jan 2026 22:50:32 -0500 Subject: [PATCH 2/2] [TD]clang warnings --- src/Mod/TechDraw/Gui/CommandExtensionPack.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp index f4e656db2c..3f18e61ccc 100644 --- a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp +++ b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp @@ -215,10 +215,11 @@ void execCircleCenterLines(Gui::Command* cmd) double radius = cgen->radius / objFeat->getScale(); // right, left, top, bottom are formed from a canonical point (center) // so they do not need to be changed to canonical form. - Base::Vector3d right(center.x + radius + 2.0, center.y, 0.0); - Base::Vector3d top(center.x, center.y + radius + 2.0, 0.0); - Base::Vector3d left(center.x - radius - 2.0, center.y, 0.0); - Base::Vector3d bottom(center.x, center.y - radius - 2.0, 0.0); + constexpr double lineOutsideCircle{2.0}; + Base::Vector3d right(center.x + radius + lineOutsideCircle, center.y, 0.0); + Base::Vector3d top(center.x, center.y + radius + lineOutsideCircle, 0.0); + Base::Vector3d left(center.x - radius - lineOutsideCircle, center.y, 0.0); + Base::Vector3d bottom(center.x, center.y - radius - lineOutsideCircle, 0.0); std::string line1tag = objFeat->addCosmeticEdge(right, left); std::string line2tag = objFeat->addCosmeticEdge(top, bottom); TechDraw::CosmeticEdge* horiz = objFeat->getCosmeticEdge(line1tag); @@ -232,7 +233,7 @@ void execCircleCenterLines(Gui::Command* cmd) } } } - cmd->getSelection().clearSelection(); + Gui::Selection().clearCompleteSelection(); objFeat->refreshCEGeoms(); objFeat->requestPaint(); Gui::Command::commitCommand();