diff --git a/src/Mod/TechDraw/App/DrawProjGroup.cpp b/src/Mod/TechDraw/App/DrawProjGroup.cpp index b4682b15b..7c395ad1c 100644 --- a/src/Mod/TechDraw/App/DrawProjGroup.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroup.cpp @@ -206,10 +206,7 @@ void DrawProjGroup::onChanged(const App::Property* prop) if ( prop == &ProjectionType || prop == &ScaleType || prop == &viewOrientationMatrix || - ((prop == &Scale) && - //!Scale.StatusBits.test(5)) ) { - !(Scale.testStatus(App::Property::ReadOnly) && //TODO: do we really care about property status here? - Scale.testStatus(App::Property::Hidden))) ) { + prop == &Scale ) { if (!isRestoring()) { execute(); } diff --git a/src/Mod/TechDraw/App/GeometryObject.cpp b/src/Mod/TechDraw/App/GeometryObject.cpp index ec7dce6bb..8d4b57960 100644 --- a/src/Mod/TechDraw/App/GeometryObject.cpp +++ b/src/Mod/TechDraw/App/GeometryObject.cpp @@ -176,9 +176,9 @@ void GeometryObject::initHLR(const TopoDS_Shape &input, //TODO: hate losing references on recompute! if Shape has changed, aren't reference potentially invalid anyway? clear(); if (brep_hlr) { - brep_hlr->Remove(1); //remove the old shape from brep (use NbShapes() first? would we ever have > 1 shape?) - //delete brep_hlr; //release old hlralgo - //brep_hlr = NULL; + if (brep_hlr->NbShapes()) { //TODO: hack. in ProjGroupItems sometimes brep_hlr has no shapes when we get here. why?? + brep_hlr->Remove(1); //remove the old shape from brep (would we ever have > 1 shape?) + } } ///TODO: Consider whether it would be possible/beneficial to cache some of this effort (eg don't do scale in OpenCASCADE land) IR @@ -204,7 +204,7 @@ void GeometryObject::initHLR(const TopoDS_Shape &input, BRepBuilderAPI_Transform mkTrf(input, tempTransform); transShape = mkTrf.Shape(); - brep_hlr = new HLRBRep_Algo(); //leak? when does this get freed? + brep_hlr = new HLRBRep_Algo(); //leak? when does this get freed? handle/smart pointer brep_hlr->Add(transShape); // Project the shape into view space with the object's centroid