[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Dec 4 03:39:29 CET 2007
SVN commit 744664 by netterfield:
Fix default limits on matrixes.
The vector selector was not working (it wouldn't set to the requested
vector). This fixes it... but see the comments.
M +2 -2 libkstapp/matrixdialog.cpp
M +10 -1 widgets/vectorselector.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/matrixdialog.cpp #744663:744664
@@ -461,8 +461,8 @@
_matrixTab->setXNumSteps(_dialogDefaults->value("matrix/xNumSteps",1000).toInt());
_matrixTab->setYNumSteps(_dialogDefaults->value("matrix/yNumSteps",1000).toInt());
- _matrixTab->setXStart(_dialogDefaults->value("matrix/reqXStart",1000).toInt());
- _matrixTab->setYStart(_dialogDefaults->value("matrix/reqYStart",1000).toInt());
+ _matrixTab->setXStart(_dialogDefaults->value("matrix/reqXStart",0).toInt());
+ _matrixTab->setYStart(_dialogDefaults->value("matrix/reqYStart",0).toInt());
} else if (DataMatrixPtr dataMatrix = kst_cast<DataMatrix>(matrix)) {
_matrixTab->setMatrixMode(MatrixTab::DataMatrix);
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #744663:744664
@@ -60,7 +60,16 @@
void VectorSelector::setSelectedVector(VectorPtr selectedVector) {
- int i = _vector->findData(qVariantFromValue(selectedVector.data()));
+ //FIXME: findData doesn't work, but the loop here - which is supposed
+ // to do exactly the same thing - does. WHY???
+ //int i = _vector->findData(qVariantFromValue(selectedVector.data()));
+ int i=-1,j;
+ for (j=0; j<_vector->count() ; j++) {
+ if (selectedVector.data() == (qVariantValue<Vector*>(_vector->itemData(j)))) {
+ i=j;
+ break;
+ }
+ }
Q_ASSERT(i != -1);
_vector->setCurrentIndex(i);
}
More information about the Kst
mailing list