[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Mar 23 05:26:19 CET 2005


CVS commit by staikos: 

correction to previous commit:
1) catch other case of PSDs
2) fix calculation of memory used by a PSD


  M +6 -10     datawizard.ui.h   1.129


--- kdeextragear-2/kst/kst/datawizard.ui.h  #1.128:1.129
@@ -471,4 +471,5 @@ void DataWizard::finished()
     {
         QListViewItemIterator it(_vectors);
+        int fftLen = int(pow(2.0, double(_kstFFTOptions->FFTLen->text().toInt() - 1)));
         while (it.current()) {
             QCheckListItem *i = static_cast<QCheckListItem*>(it.current());
@@ -486,15 +487,10 @@ void DataWizard::finished()
 
                 if (_kstDataRange->DoSkip->isChecked()) {
-                    if (_radioButtonPlotPSD->isChecked()) {
-                        memoryRequested += 3 * frames / _kstDataRange->Skip->value()*sizeof(double);
-                    } else {
                         memoryRequested += frames / _kstDataRange->Skip->value()*sizeof(double);
-                    }
-                } else {
-                    if (_radioButtonPlotPSD->isChecked()) {
-                        memoryRequested += 3 * frames * ds->samplesPerFrame(field)*sizeof(double);
                     } else {
                         memoryRequested += frames * ds->samplesPerFrame(field)*sizeof(double);
                     }
+                if (_radioButtonPlotPSD->isChecked() || _radioButtonPlotDataPSD->isChecked()) {
+                    memoryRequested += fftLen * 2;
                 }
             }




More information about the Kst mailing list