Skip to content

Commit

Permalink
Sketcher bug fixes: Crash on deleting a line from the sketch
Browse files Browse the repository at this point in the history
============================================================

- Crashing on deleting line on fully constraint box

As a bonus:
- Fully constrained sketch not shown in green on opening the sketch
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed Jun 24, 2015
1 parent 4caa464 commit 65310f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/Mod/Sketcher/App/SketchObject.cpp
Expand Up @@ -782,9 +782,6 @@ int SketchObject::delConstraintOnPoint(int GeoId, PointPos PosId, bool onlyCoinc
if (newVals.size() < vals.size()) {
this->Constraints.setValues(newVals);

if(noRecomputes) // if we do not have a recompute, the sketch must be solved to update the DoF of the solver
solve();

return 0;
}

Expand Down
5 changes: 3 additions & 2 deletions src/Mod/Sketcher/Gui/ViewProviderSketch.cpp
Expand Up @@ -4223,9 +4223,10 @@ bool ViewProviderSketch::setEdit(int ModNum)
// The false parameter indicates that the geometry of the SketchObject shall not be updateData
// so as not to trigger an onChanged that would set the document as modified and trigger a recompute
// if we just close the sketch without touching anything.
getSketchObject()->solve(false);
draw(false);
getSketchObject()->solve(false);
UpdateSolverInformation();
draw(false);


connectUndoDocument = Gui::Application::Instance->activeDocument()
->signalUndoDocument.connect(boost::bind(&ViewProviderSketch::slotUndoDocument, this, _1));
Expand Down

0 comments on commit 65310f0

Please sign in to comment.