summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/graphicsview/qsimplex_p.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp
index b1cba45..b90d53f 100644
--- a/src/gui/graphicsview/qsimplex_p.cpp
+++ b/src/gui/graphicsview/qsimplex_p.cpp
@@ -220,7 +220,13 @@ void QSimplex::combineRows(int toIndex, int fromIndex, qreal factor)
qreal *to = matrix + toIndex * columns;
for (int j = 1; j < columns; ++j) {
- to[j] += factor * from[j];
+ qreal value = from[j];
+
+ // skip to[j] = to[j] + factor*0.0
+ if (value == 0.0)
+ continue;
+
+ to[j] += factor * value;
// ### Avoid Numerical errors
if (qAbs(to[j]) < 0.0000000001)