summaryrefslogtreecommitdiffstats
path: root/basegfx/source/matrix/b3dhommatrix.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/matrix/b3dhommatrix.cxx')
-rw-r--r--basegfx/source/matrix/b3dhommatrix.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/basegfx/source/matrix/b3dhommatrix.cxx b/basegfx/source/matrix/b3dhommatrix.cxx
index d23aed896120..e3f3d3d28475 100644
--- a/basegfx/source/matrix/b3dhommatrix.cxx
+++ b/basegfx/source/matrix/b3dhommatrix.cxx
@@ -117,9 +117,20 @@ namespace basegfx
B3DHomMatrix& B3DHomMatrix::operator*=(const B3DHomMatrix& rMat)
{
- if(!rMat.isIdentity())
+ if(rMat.isIdentity())
+ {
+ // multiply with identity, no change -> nothing to do
+ }
+ else if(isIdentity())
+ {
+ // we are identity, result will be rMat -> assign
+ *this = rMat;
+ }
+ else
+ {
+ // multiply
mpImpl->doMulMatrix(*rMat.mpImpl);
-
+ }
return *this;
}