[Kst] extragear/graphics/kst/kst

Andrew Walker arwalker at sumusltd.com
Tue May 17 18:40:33 CEST 2005


SVN commit 415050 by arwalker:

Fix problem with skipping frames,
where starting frame is 0.

CCMAIL: 104765-done at bugs.kde.org

 M  +5 -7      trunk/extragear/graphics/kst/kst/kstrvector.cpp  


--- trunk/extragear/graphics/kst/kst/kstrvector.cpp #415049:415050
@@ -464,13 +464,11 @@
   }
 
   if (DoSkip) {
-    // change new_f0 and new_nf so they both lie on skip boundaries
-    //tmp_fn = ((new_f0 + new_nf)/Skip) * Skip - 1;
-    tmp_fn = new_f0 + new_nf - 1;
-    // new_f0 == 0 results in (new_f0 - 1)/Skip being -0.x which rounds the
-    // wrong way on us.  Therefore new_f0 == 0 is a special case.
-    new_f0 = new_f0 == 0 ? 0 : (((new_f0 - 1)/Skip) + 1) * Skip;
-    new_nf = tmp_fn - new_f0 + 1;
+      // change new_f0 and new_nf so they both lie on skip boundaries
+      if (new_f0 != 0) {
+        new_f0 = (((new_f0-1)/Skip)+1)*Skip;
+      }
+      new_nf = (new_nf/Skip)*Skip;
   }
 
   if (NF == new_nf && F0 == new_f0 && !force) {


More information about the Kst mailing list