[TD]prevent extra recompute on X,Y change

This commit is contained in:
WandererFan
2020-05-01 21:26:36 -04:00
committed by WandererFan
parent fdd99d2b28
commit 92dfdf605b
6 changed files with 39 additions and 66 deletions

View File

@@ -348,6 +348,8 @@ void CmdTechDrawView::activated(int iMsg)
openCommand("Create view");
std::string FeatName = getUniqueObjectName("View");
doCommand(Doc,"App.activeDocument().addObject('TechDraw::DrawViewPart','%s')",FeatName.c_str());
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
App::DocumentObject *docObj = getDocument()->getObject(FeatName.c_str());
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart *>(docObj);
if (!dvp) {
@@ -355,7 +357,6 @@ void CmdTechDrawView::activated(int iMsg)
}
dvp->Source.setValues(shapes);
dvp->XSource.setValues(xShapes);
doCommand(Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str());
if (faceName.size()) {
std::pair<Base::Vector3d,Base::Vector3d> dirs = DrawGuiUtil::getProjDirFromFace(partObj,faceName);
projDir = dirs.first;