[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Thu Aug 12 21:27:40 CEST 2004
CVS commit by staikos:
untested fix for 87055 - don't use stdin sourced vectors to save the default
settings. Also add an accessor to kstrvector to access the data source
M +5 -0 kstrvector.cpp 1.54
M +3 -1 kstrvector.h 1.22
M +13 -0 kstvectordefaults.cpp 1.5
--- kdeextragear-2/kst/kst/kstrvector.cpp #1.53:1.54
@@ -541,3 +541,8 @@ void KstRVector::reload() {
}
+KstDataSourcePtr KstRVector::dataSource() const {
+ return _file;
+}
+
+
// vim: ts=2 sw=2 et
--- kdeextragear-2/kst/kst/kstrvector.h #1.21:1.22
@@ -109,4 +108,7 @@ public:
bool isValid() const;
+ /** the data source */
+ KstDataSourcePtr dataSource() const;
+
private:
KstObject::UpdateType doUpdate(bool force = false);
--- kdeextragear-2/kst/kst/kstvectordefaults.cpp #1.4:1.5
@@ -20,4 +20,5 @@
#include "kstpsdcurve.h"
#include "kstdatacollection.h"
+#include "stdinsource.h"
#include <kconfig.h>
@@ -91,4 +92,16 @@ void KstVectorDefaults::sync() {
KST::vectorList.lock().readUnlock();
int j = vl.count() - 1;
+
+ // Find a non-stdin source
+ while (j >= 0) {
+ vl[j]->readLock();
+ KstDataSourcePtr dsp = vl[j]->dataSource();
+ vl[j]->readUnlock();
+ if (dsp && !dynamic_cast<KstStdinSource*>(dsp.data())) {
+ break;
+ }
+ --j;
+ }
+
if (j >= 0) {
vl[j]->readLock();
More information about the Kst
mailing list