+ fix crashes on deleting Sketcher geometries

+ whitespace improvements


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5006 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
logari81
2011-10-11 21:22:55 +00:00
parent e9bc1bfff8
commit 5df128b21f
2 changed files with 14 additions and 8 deletions

View File

@@ -1483,6 +1483,7 @@ float ViewProviderSketch::getScaleFactor()
return 1.f;
}
}
void ViewProviderSketch::draw(bool temp)
{
assert(edit);
@@ -1669,7 +1670,7 @@ Restart:
// get the geometry
const Part::Geometry *geo = (*geomlist)[Constr->First];
// Vertical can only be a GeomLineSegment
assert(geo->getTypeId()== Part::GeomLineSegment::getClassTypeId());
assert(geo->getTypeId() == Part::GeomLineSegment::getClassTypeId());
const Part::GeomLineSegment *lineSeg = dynamic_cast<const Part::GeomLineSegment *>(geo);
// calculate the half distance between the start and endpoint
@@ -2938,7 +2939,6 @@ Sketcher::SketchObject *ViewProviderSketch::getSketchObject(void) const
return dynamic_cast<Sketcher::SketchObject *>(pcObject);
}
bool ViewProviderSketch::onDelete(const std::vector<std::string> &subList)
{
//FIXME use the selection subelements instead of the Sel Sets...