[Kst] [Bug 129068] Can select slave vector of object for object's input
Andrew Walker
arwalker at sumusltd.com
Mon May 14 23:21:39 CEST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=129068
------- Additional Comments From arwalker sumusltd com 2007-05-14 23:21 -------
SVN commit 664798 by arwalker:
CCBUG:129068 Display message to user to inform they have created a recursion in their dependencies. Probably still some other ways for the user to achieve this
M +4 -1 kstbasicdialog_i.cpp
M +19 -13 kstcsddialog_i.cpp
M +13 -7 ksteqdialog_i.cpp
M +6 -0 ksthsdialog_i.cpp
M +6 -0 kstplugindialog_i.cpp
M +10 -4 kstpsddialog_i.cpp
--- branches/work/kst/1.5/kst/src/libkstapp/kstbasicdialog_i.cpp #664797:664798
@ -311,6 +311,10 @
KMessageBox::sorry(this, i18n("There is an error in the values you entered."));
return false;
}
+ if (ptr->recursion()) {
+ KMessageBox::sorry(this, i18n("There is a recursion resulting from the plugin you entered."));
+ return false;
+ }
ptr->setDirty();
@ -394,7 +398,6 @
}
}
}
-
}
return true;
--- branches/work/kst/1.5/kst/src/libkstapp/kstcsddialog_i.cpp #664797:664798
@ -245,19 +245,19 @
// get the values that need to be checked for consistency
double pSampRate;
int pFFTLen;
-
+
if (_sampRateDirty) {
pSampRate = _w->_kstFFTOptions->SampRate->text().toDouble();
} else {
pSampRate = csPtr->freq();
}
-
+
if (_fFTLenDirty) {
pFFTLen = _w->_kstFFTOptions->FFTLen->text().toInt();
} else {
pFFTLen = csPtr->length();
}
-
+
if (!_w->_kstFFTOptions->checkGivenValues(pSampRate, pFFTLen)) {
csPtr->unlock();
return false;
@ -266,7 +266,7 @
if (_sampRateDirty) {
csPtr->setFreq(_w->_kstFFTOptions->SampRate->text().toDouble());
}
-
+
if (_fFTLenDirty) {
csPtr->setLength(_w->_kstFFTOptions->FFTLen->text().toInt());
}
@ -274,40 +274,46 @
if (_apodizeDirty) {
csPtr->setApodize(_w->_kstFFTOptions->Apodize->isChecked());
}
-
+
if (_apodizeFxnDirty) {
csPtr->setApodizeFxn(ApodizeFunction(_w->_kstFFTOptions->ApodizeFxn->currentItem()));
}
-
+
if (_gaussianSigmaDirty) {
csPtr->setGaussianSigma(_editMultipleMode ? _w->_kstFFTOptions->Sigma->value() - 1 :
_w->_kstFFTOptions->Sigma->value());
}
-
+
if (_removeMeanDirty) {
csPtr->setRemoveMean(_w->_kstFFTOptions->RemoveMean->isChecked());
}
-
+
if (_interleavedDirty) {
csPtr->setAverage(_w->_kstFFTOptions->Interleaved->isChecked());
}
-
+
if (_windowSizeDirty) {
csPtr->setWindowSize(_w->_windowSize->value());
}
-
+
if (_rateUnitsDirty) {
csPtr->setRateUnits(_w->_kstFFTOptions->RateUnits->text());
}
-
+
if (_vectorUnitsDirty) {
csPtr->setVectorUnits(_w->_kstFFTOptions->VectorUnits->text());
}
-
+
if (_outputDirty) {
csPtr->setOutput(PSDType(_w->_kstFFTOptions->Output->currentItem()));
}
-
+
+ if (csPtr->recursion()) {
+ KMessageBox::error(this, i18n("There is a recursion resulting from the spectrogram you entered."));
+ csPtr->unlock();
+ return false;
+ }
+
csPtr->unlock();
return true;
}
--- branches/work/kst/1.5/kst/src/libkstapp/ksteqdialog_i.cpp #664797:664798
@ -293,14 +293,14 @
vp = eqPtr->vX();
}
KST::vectorList.lock().unlock();
-
+
// update the DoInterpolation only if it is dirty
if (_doInterpolationDirty) {
eqPtr->setExistingXVector(vp, _w->_doInterpolation->isChecked());
} else {
eqPtr->setExistingXVector(vp, eqPtr->doInterp());
}
-
+
if (_equationDirty) {
eqPtr->setEquation(_w->_equation->text());
if (!eqPtr->isValid()) {
@ -311,23 +311,29 @
}
KMessageBox::detailedSorry(this, i18n("There is an error in the equation you entered."), parseErrors);
eqPtr->unlock();
+ return true;
+ }
+ if (eqPtr->recursion()) {
+ KMessageBox::error(this, i18n("There is a recursion resulting from the equation you entered."));
+ eqPtr->unlock();
return false;
}
}
eqPtr->unlock();
+
return true;
}
bool KstEqDialogI::editObject() {
KstEquationList eqList = kstObjectSubList<KstDataObject,KstEquation>(KST::dataObjectList);
-
+
// if editing multiple objects, edit each one
if (_editMultipleMode) {
// if the user selected no vector, treat it as non-dirty
_xVectorsDirty = _w->_xVectors->_vector->currentItem() != 0;
_equationDirty = !_w->_equation->text().isEmpty();
-
+
bool didEdit = false;
for (uint i = 0; i < _editMultipleWidget->_objectList->count(); i++) {
if (_editMultipleWidget->_objectList->isSelected(i)) {
@ -336,7 +342,7 @
if (eqIter == eqList.end()) {
return false;
}
-
+
KstEquationPtr eqPtr = *eqIter;
if (!editSingleObject(eqPtr)) {
return false;
@ -356,11 +362,11 @
_tagName->setFocus();
return false;
}
-
+
ep->writeLock();
ep->setTagName(tag_name);
ep->unlock();
-
+
// then edit the object
_equationDirty = true;
_xVectorsDirty = true;
--- branches/work/kst/1.5/kst/src/libkstapp/ksthsdialog_i.cpp #664797:664798
@ -331,6 +331,12 @
hsPtr->writeLock();
+ if (hsPtr->recursion()) {
+ KMessageBox::error(this, i18n("There is a recursion resulting from the histogram you entered."));
+ hsPtr->unlock();
+ return false;
+ }
+
if (_nDirty) {
hsPtr->setNBins(new_n_bins);
}
--- branches/work/kst/1.5/kst/src/libkstapp/kstplugindialog_i.cpp #664797:664798
@ -639,6 +639,12 @
KMessageBox::sorry(this, i18n("There is an error in the plugin you entered."));
return false;
}
+
+ if (pp->recursion()) {
+ KMessageBox::sorry(this, i18n("There is a recursion resulting from the plugin you entered."));
+ return false;
+ }
+
pp->setDirty();
emit modified();
--- branches/work/kst/1.5/kst/src/libkstapp/kstpsddialog_i.cpp #664797:664798
@ -261,22 +261,28 @
psPtr->setVector(v);
}
+ if (psPtr->recursion()) {
+ KMessageBox::error(this, i18n("There is a recursion resulting from the spectrum you entered."));
+ psPtr->unlock();
+ return false;
+ }
+
// get the values that need to be checked for consistency
double pSampRate;
int pFFTLen;
-
+
if (_sampRateDirty) {
pSampRate = _w->_kstFFTOptions->SampRate->text().toDouble();
} else {
pSampRate = psPtr->freq();
}
-
+
if (_fFTLenDirty) {
pFFTLen = _w->_kstFFTOptions->FFTLen->text().toInt();
} else {
pFFTLen = psPtr->len();
}
-
+
if (!_w->_kstFFTOptions->checkGivenValues(pSampRate, pFFTLen)) {
psPtr->unlock();
return false;
@ -285,7 +291,7 @
if (_sampRateDirty) {
psPtr->setFreq(_w->_kstFFTOptions->SampRate->text().toDouble());
}
-
+
if (_fFTLenDirty) {
psPtr->setLen(_w->_kstFFTOptions->FFTLen->text().toInt());
}
More information about the Kst
mailing list