From 8642aae91c4f5d6ba3924bd212d97da08ec10393 Mon Sep 17 00:00:00 2001 From: Saksham Malhotra Date: Thu, 8 Jan 2026 13:23:26 +0530 Subject: [PATCH] Fix sketch redundancy warning (#26064) --- src/Mod/Sketcher/App/SketchObject.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 904d88152f..e33be032d7 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -596,10 +596,22 @@ int SketchObject::solve(bool updateGeoAfterSolving /*=true*/) } if (lastHasPartialRedundancies) { - Base::Console().warning( - this->getFullLabel(), - QT_TRANSLATE_NOOP("Notifications", - "The Sketch has partially redundant constraints!") "\n"); + QString uniqueName = QString::fromLatin1(this->getNameInDocument()); + QString userLabel = QString::fromUtf8(Label.getValue()); + + QString ref; + if (uniqueName == userLabel) { + ref = uniqueName; + } else { + ref = QStringLiteral("%1 (%2)").arg(uniqueName).arg(userLabel); + } + + QString msg = QCoreApplication::translate( + "Notifications", + "\"%1\" has partially redundant constraint(s)." + ).arg(ref); + + Base::Console().warning(this->getFullLabel(), "%s\n", msg.toUtf8().constData()); } lastSolveTime = solvedSketch.getSolveTime();