Replace use of Matrix.inverse() with inverseGauss()

Because of possible scaling involved.
This commit is contained in:
Zheng, Lei
2019-09-29 17:29:37 +08:00
committed by wmayer
parent eeae3457c4
commit c146fbbdba
2 changed files with 4 additions and 4 deletions

View File

@@ -2401,7 +2401,7 @@ bool ViewProviderLink::initDraggingPlacement() {
dragCtx->preTransform = doc->getEditingTransform();
auto plaMat = pla.toMatrix();
plaMat.inverse();
plaMat.inverseGauss();
dragCtx->preTransform *= plaMat;
dragCtx->bbox = linkView->getBoundBox();
@@ -2409,7 +2409,7 @@ bool ViewProviderLink::initDraggingPlacement() {
dragCtx->bbox.GetCenter(),Base::Rotation());
dragCtx->initialPlacement = pla * offset;
dragCtx->mat = offset.toMatrix();
dragCtx->mat.inverse();
dragCtx->mat.inverseGauss();
return true;
}

View File

@@ -361,14 +361,14 @@ void SubShapeBinder::update() {
first = false;
} else {
// The remaining support will cancel the Placement
mat.inverse();
mat.inverseGauss();
res.first->second = mat;
}
}else{
// For newer SubShapeBinder, the Placement property is free
// to use by the user to add additional offset to the
// binding object
mat.inverse();
mat.inverseGauss();
res.first->second = Placement.getValue().toMatrix()*mat;
}
}