From fbc6ed5c776898fad42b151d55a66a7dff65ede9 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Thu, 9 Jul 2015 07:49:52 +0200 Subject: [PATCH] Sketcher: Bug fix: Wrong solver information upon failed solve ============================================================= http://forum.freecadweb.org/viewtopic.php?f=10&t=11341&start=80#p92820 ...I already have a minor bug, if you insert a conflicting dimensional constraint, the solver information is not updated, the work-around is to hit "Manual Update". --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 987177dd6..d310432e0 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -4089,10 +4089,13 @@ void ViewProviderSketch::updateData(const App::Property *prop) // Because a solve is mandatory to any addition (at least to update the DoF of the solver), // only when the solver geometry is the same in number than the sketch geometry an update // should trigger a redraw. This reduces even more the number of redraws per insertion of geometry - + + // solver information is also updated when no matching geometry, so that if a solving fails + // this failed solving info is presented to the user + UpdateSolverInformation(); // just update the solver window with the last SketchObject solving information + if(getSketchObject()->getExternalGeometryCount()+getSketchObject()->getHighestCurveIndex() + 1 == getSketchObject()->getSolvedSketch().getGeometrySize()) { - UpdateSolverInformation(); // just update the solver window with the last SketchObject solving information draw(false); signalConstraintsChanged();