Cleanup dangling debug code

This commit is contained in:
wandererfan
2019-06-21 21:32:35 -04:00
committed by WandererFan
parent fbfdb69c20
commit 7ee2f0c80a
3 changed files with 30 additions and 24 deletions

View File

@@ -284,7 +284,7 @@ App::DocumentObjectExecReturn *DrawViewPart::execute(void)
return App::DocumentObject::StdReturn;
}
rebuildCosmoVertex();
// rebuildCosmoVertex();
// rebuildCosmoEdge();
App::Document* doc = getDocument();
@@ -1005,10 +1005,14 @@ void DrawViewPart::rebuildCosmoEdge(void)
int DrawViewPart::addCosmeticVertex(Base::Vector3d pos)
{
// Base::Console().Message("DVP::addCosmeticVertex(%s)\n", DrawUtil::formatVector(pos).c_str());
TechDraw::CosmeticVertex* rVert = new TechDraw::CosmeticVertex(pos);
vertexCosmetic.push_back(rVert);
TechDraw::CosmeticVertex* cv = new TechDraw::CosmeticVertex(pos);
vertexCosmetic.push_back(cv);
int newIdx = (int) (vertexCosmetic.size() - 1);
stuffCosmeticVertexList();
std::string csv = cv->toCSV();
std::vector<std::string> vertexList = CosmeticVertexList.getValues();
vertexList.push_back(csv);
CosmeticVertexList.setValues(vertexList);
return newIdx;
}
@@ -1217,6 +1221,17 @@ TechDraw::CosmeticEdge* DrawViewPart::getCosmeticEdgeByLink(int idx) const
return result;
}
void DrawViewPart::onDocumentRestored()
{
rebuildCosmoVertex();
rebuildCosmoEdge();
// requestPaint();
//if execute has not run yet, there will be no GO, and paint will not do anything.
execute();
DrawView::onDocumentRestored();
}
PyObject *DrawViewPart::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {