Replace use of Matrix.inverse() with inverseGauss()
Because of possible scaling involved.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user