From 4e0498c48eebbade6518c5c40f833f8ed6334afa Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Wed, 9 Feb 2022 00:03:37 -0500 Subject: [PATCH] [Sketcher] Use proper formatting for knot list in dialog --- .../Sketcher/Gui/CommandSketcherBSpline.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp index 8ed059a5b6..78068c33b5 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp @@ -1044,11 +1044,21 @@ void CmdSketcherInsertKnot::activated(int iMsg) knotDialog.setWindowTitle(QObject::tr("Knot parameter")); // use values from `knots` and `weights` and insert in label std::stringstream knotList; - for (auto knot : knots) - knotList << " " << knot << ","; + { + auto it = knots.cbegin(); + knotList << "(" << (*it++); + for (; it != knots.cend(); ++it) + knotList << ", " << (*it); + knotList << ")"; + } std::stringstream multList; - for (auto mult : mults) - multList << " " << mult << ","; + { + auto it = mults.cbegin(); + multList << "(" << (*it++); + for (; it != mults.cend(); ++it) + multList << ", " << (*it); + multList << ")"; + } knotDialog.setLabelText(QObject::tr("Please provide the parameter where the knot is to be inserted.\n" "Current knots: %1\n" "Multiplicities: %2\n")