From 9fb3a575c3b7585b7789c48e8fbfa1db8619a173 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 19 Apr 2016 17:43:49 +0300 Subject: [PATCH] DOF is visualized in label widget: correction compilation on Linux --- src/SketchSolver/SketchSolver_Manager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SketchSolver/SketchSolver_Manager.cpp b/src/SketchSolver/SketchSolver_Manager.cpp index f83e7fe48..6511bc843 100644 --- a/src/SketchSolver/SketchSolver_Manager.cpp +++ b/src/SketchSolver/SketchSolver_Manager.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include static const Events_ID anUpdateEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED); @@ -569,10 +569,11 @@ void SketchSolver_Manager::degreesOfFreedom() continue; // nothing is changed myDoF[aDoFIt->first] = aDoFIt->second; // change attribute value - char aValue[10]; - _itoa_s(aDoFIt->second, aValue, 10); - aDoFIt->first->data()->string(SketchPlugin_Sketch::SOLVER_DOF())->setValue( - "DOF(degree of freedom) = "+ std::string(aValue)); + std::ostringstream aStream; + std::string aValue = "DOF(degree of freedom) = "; + aStream << aDoFIt->second; + aDoFIt->first->data()->string(SketchPlugin_Sketch::SOLVER_DOF())->setValue(aValue); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); } } -- 2.39.2