Fix bug with wrong increment referens in modeling spline and modeling path.

This commit is contained in:
dismine 2013-09-18 22:23:46 +03:00
parent 642c8dbe55
commit 4de9869188

View File

@ -767,8 +767,13 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme
spl.setMode(typeObject);
spl.setIdObject(idObject);
data->UpdateModelingSpline(id, spl);
if(typeObject == Draw::Calculation){
data->IncrementReferens(spl.GetP1(), Scene::Point, Draw::Calculation);
data->IncrementReferens(spl.GetP4(), Scene::Point, Draw::Calculation);
} else {
data->IncrementReferens(spl.GetP1(), Scene::Point, Draw::Modeling);
data->IncrementReferens(spl.GetP4(), Scene::Point, Draw::Modeling);
}
return;
}
if(type == "modelingPath"){
@ -789,8 +794,12 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme
data->UpdateModelingSplinePath(id, path);
const QVector<VSplinePoint> *points = path.GetPoint();
for(qint32 i = 0; i<points->size(); ++i){
if(typeObject == Draw::Calculation){
data->IncrementReferens(points->at(i).P(), Scene::Point, Draw::Calculation);
} else {
data->IncrementReferens(points->at(i).P(), Scene::Point, Draw::Modeling);
}
}
return;
}
}