Bug 143602 - Using Advance 1 Screen sometimes jumps to wrong position
Summary: Using Advance 1 Screen sometimes jumps to wrong position
Alias: None
Product: kst
Classification: Unclassified
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kst
Depends on:
Reported: 2007-03-29 19:59 UTC by Andrew Walker
Modified: 2007-04-12 20:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:

Proposed patch (473 bytes, patch)
2007-04-06 00:35 UTC, Andrew Walker

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2007-03-29 19:59:06 UTC
Version:           HEAD (using KDE KDE 3.5.1)
OS:                Linux


When viewing live data hitting on the Advance 1 Screen does not take the user to the anticipated position


Run dirfile_maker to create a data file updating in real time
Start Kst
Start the data wizard and select a vector from the dirfile_maker data file
In the data wizard set the Data Range: Start to 0 and (after unchecking 'Read to end' if necessary) the Range to 100
In the data wizard click finish
Click on the 'Read from End' toolbar button
Click on the 'Advance 1 Screen' button


The curve displays the second screen of data associated with the Curve and appears static


We leave 'Read to end' mode and the final screen of data at the time the button is pressed is displayed
Comment 1 Andrew Walker 2007-04-06 00:35:54 UTC
Created attachment 20197 [details]
Proposed patch
Comment 2 Netterfield 2007-04-06 03:43:29 UTC
Looks good, but it makes me just a little worried for 1.4.0 given the late 
date.  The current behavior has been around for a long time, and hasn't been 
debilitating, so I reluctantly say to delay commiting this until 1.4.0 is out 
the door, and then commit for 1.4.1.

On Thursday 05 April 2007 6:35:54 pm Andrew Walker wrote:
[bugs.kde.org quoted mail]
Comment 3 Andrew Walker 2007-04-12 20:04:45 UTC
SVN commit 653144 by arwalker:

BUG:143602 Correctly handle 'advance one screen' when in 'read to end' mode

 M  +5 -1      kstdoc.cpp  

--- branches/work/kst/1.5/kst/src/libkstapp/kstdoc.cpp #653143:653144
@@ -889,7 +889,11 @@
     int fileN = V->fileLength();
     bool didChange = false;
-    if (f0 + 2 * n > fileN) {
+    if (f0 == -1) {
+      didChange = true;
+      f0 = fileN - n;
+    } else if (f0 + 2 * n > fileN) {
       didChange = f0 != fileN - n;
       changed = changed || didChange;
       f0 = fileN - n;