Version: 1.6.0 (using KDE 4.0.0) Installed from: Compiled From Sources OS: Linux Problem: After specifying data range for an existing matrix in Data Manager, the matrix will not be updated automatically until some other operation has been done, such as generating another vector,etc. Example: Open kst, construct a matrix from a data source called mx.dat in attached file. Data-->New Matrix... --> select the file name: mx.dat and field [MATRIX,5,0,0,1,1] A new matrix [MATRIX,5,0,0,1,1] with 10 samples is shown in data manager. Right Click on this matrix and choose Edit... Uncheck Read to end options for X/Ynumber of fames, and change X number of frame = 2 and Y number of frames =2 Now, in Data Manager, the sample number of the matrix is still 10, but it should be 4. Select View Matrix Values... in Data menu, the matrix entries are not updated. However, if you do another operation at this time, such as generating a new static vector from Data Manager. The matrix [MATRIX,5,0,0,1,1] will be updated in both Data Manager and View Matrix Value.
Created attachment 23642 [details] the source file used to generate the matrix mentioned in the bug description
A vector in a similar situation updates only because the ASCII data source calls KstDataSource::updateNumFramesScalar. As this value is marked as dirty as a result, the next update loop will update its provider (i.e. the vector). For the matrix case this call sends the already existing value to KstDataSource::updateNumFramesScalar, so the value is not marked as dirty and so the matrix is not updated on the next update loop. NOTE: calling setDirty on the scalar is insufficient as this does not achieve the same result as the code in KstScalar::setValue, where the new value is not equal to the old value.
No primitive object will update when it is not in use. This applies to vectors and matrices. This is a "feature" of kst, in that it removes the need to update objects that are not actually in use - saving processing time.