[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] krita/ui/tool: Changed an assert to a warning
From: Dmitry Kazakov <dimula73 () gmail ! com>
Date: 2013-06-30 18:46:40
Message-ID: E1UtMe0-00019L-GE () scm ! kde ! org
[Download RAW message or body]
Git commit 438e34d52a75bfeeabf7290ddf4ba061d2aa8738 by Dmitry Kazakov.
Committed on 30/06/2013 at 18:46.
Pushed by dkazakov into branch 'master'.
Changed an assert to a warning
If someone sees a warning that velocity is zero, please let me know. I need
to find out why it happens.
CCBUG:321769
M +5 -2 krita/ui/tool/kis_tool_freehand_helper.cpp
http://commits.kde.org/calligra/438e34d52a75bfeeabf7290ddf4ba061d2aa8738
diff --git a/krita/ui/tool/kis_tool_freehand_helper.cpp b/krita/ui/tool/kis_tool_freehand_helper.cpp
index 333c7d5..a5b67d4 100644
--- a/krita/ui/tool/kis_tool_freehand_helper.cpp
+++ b/krita/ui/tool/kis_tool_freehand_helper.cpp
@@ -199,8 +199,11 @@ void KisToolFreehandHelper::paintBezierSegment(KisPaintInformation pi1, KisPaint
qreal velocity1 = QLineF(QPointF(), tangent1).length();
qreal velocity2 = QLineF(QPointF(), tangent2).length();
- Q_ASSERT(velocity1 > 0);
- Q_ASSERT(velocity2 > 0);
+ if (velocity1 == 0.0 || velocity2 == 0.0) {
+ velocity1 = 1e-6;
+ velocity2 = 1e-6;
+ qWarning() << "WARNING: Basic Smoothing: Velocity is Zero! Please report a bug:" << \
ppVar(velocity1) << ppVar(velocity2); + }
qreal similarity = qMin(velocity1/velocity2, velocity2/velocity1);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic