2 changes: 2 additions & 0 deletions src/datasources/ascii/asciiconfigwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
***************************************************************************/

#include "asciiconfigwidget.h"
#include "objectstore.h"

#include "kst_atof.h"

Expand Down Expand Up @@ -384,6 +385,7 @@ void AsciiConfigWidget::save() {
if (_ac->config().isUpdateNecessary(_oldConfig)) {
src->reset();
src->updateLists();
src->store()->resetDataSourceDependents(src->fileName());
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions src/libkst/objectstore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ ObjectPtr ObjectStore::retrieveObject(const QString& name) const {
return NULL;
}

void ObjectStore::resetDataSourceDependents(QString filename) {
PrimitiveList allPrimitives = getObjects<Primitive>();

foreach (PrimitivePtr P, allPrimitives) {
DataPrimitive* dp = qobject_cast<DataPrimitive*>(P);
if (dp) {
if (filename == dp->filename()) {
P->writeLock();
P->reset();
P->unlock();
}
}
}
}

void ObjectStore::rebuildDataSourceList() {
cleanUpDataSourceList();
foreach (DataSourcePtr ds, _dataSourceList) {
Expand Down
3 changes: 3 additions & 0 deletions src/libkst/objectstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class KSTCORE_EXPORT ObjectStore
/** remove unused data sources from the list */
void cleanUpDataSourceList();

/** reset dependents of a data source */
void resetDataSourceDependents(QString filename);

/** get everything but the data sources */
QList<ObjectPtr> objectList();

Expand Down
1 change: 0 additions & 1 deletion src/libkst/updatemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ void UpdateManager::doUpdates(bool forceImmediate) {

// update the datasources
foreach (DataSourcePtr ds, _store->dataSourceList()) {
//qDebug() << "updating DS " << ds->Name();
ds->writeLock();
retval = ds->objectUpdate(_serial);
ds->unlock();
Expand Down
4 changes: 3 additions & 1 deletion src/libkstapp/datasourcedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ DataSourceDialog::DataSourceDialog(DataDialog::EditMode mode, DataSourcePtr data
connect(this, SIGNAL(cancel()), _configWidget, SLOT(cancel()));

if (mode == DataDialog::Edit) {
connect(this, SIGNAL(ok()), this, SLOT(disableReuse()));
// Why would we want a source to not be reuseable?
// Note: this is the only place where reuse is ever disabled...
//connect(this, SIGNAL(ok()), this, SLOT(disableReuse()));
}

_dataSource->unlock();
Expand Down
3 changes: 2 additions & 1 deletion src/widgets/fftoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ FFTOptions::FFTOptions(QWidget *parent)
_apodize->setProperty("si","Apodi&ze");
textLabel2->setProperty("si","Fun&ction:");
_removeMean->setProperty("si","Remo&ve mean");
TextLabel1_9->setProperty("si","FFT &length: 2^");
_FFTLengthLabel->setProperty("si","FFT &length: 2^");
_interleavedAverage->setProperty("si","Interleave&d average");
_interpolateOverHoles->setProperty("si","Interpolate over &holes");
TextLabel1_9_2->setProperty("si","Sa&mple rate:");
Expand Down Expand Up @@ -257,6 +257,7 @@ void FFTOptions::changedApodizeFxn() {

void FFTOptions::clickedInterleaved() {
_FFTLength->setEnabled(_interleavedAverage->isChecked());
_FFTLengthLabel->setEnabled(_interleavedAverage->isChecked());
}


Expand Down
6 changes: 3 additions & 3 deletions src/widgets/fftoptions.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>739</width>
<height>196</height>
<width>737</width>
<height>194</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
Expand Down Expand Up @@ -171,7 +171,7 @@
<number>0</number>
</property>
<item row="0" column="2">
<widget class="QLabel" name="TextLabel1_9">
<widget class="QLabel" name="_FFTLengthLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand Down