ganeswidgets/src/hgspring.cpp
changeset 3 c863538fcbb6
parent 2 49c70dcc3f17
child 5 4fa04caf0f43
--- a/ganeswidgets/src/hgspring.cpp	Fri May 14 16:57:01 2010 +0300
+++ b/ganeswidgets/src/hgspring.cpp	Thu May 27 13:59:05 2010 +0300
@@ -83,10 +83,12 @@
 
 void HgSpring::cancel()
 {
-    if (mTimer->isActive())
+    if (mTimer->isActive()) {
+        mEndPos = mPos;
+        emit ended();
         mTimer->stop(); 
+    }
     
-    mVelocity = QPointF(0,0);
 }
 
 const QPointF& HgSpring::startPos() const
@@ -164,5 +166,8 @@
     return false;
 }
 
+void HgSpring::resetVelocity()
+{
+    mVelocity = QPointF(0,0);
+}
 
-