[Kst] branches/work/kst/portto4/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Mon May 25 17:03:20 CEST 2009
SVN commit 972746 by netterfield:
Fix crash from improperly enabled/disabled edit buttons in vector selector.
M +0 -4 devel-docs/Kst2Specs/Bugs
M +3 -2 devel-docs/Kst2Specs/FixedBugs
M +5 -1 src/widgets/vectorselector.cpp
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/Bugs #972745:972746
@@ -105,7 +105,3 @@
and tick marks from black. I though the brush colour under "Stroke"
might do it, but nope.
-----------
-
-Crash case: edit vector button is active in vector selectors
-for error bar vectors which aren't yet set. Clicking crashes.
--- branches/work/kst/portto4/kst/devel-docs/Kst2Specs/FixedBugs #972745:972746
@@ -639,9 +639,10 @@
----------
-
Error in choice of offset mode.
Create a plot with a Y range from -0.032 to 0.041. It goes into base/offset mode and shouldn't.
+------------
-------------
\ No newline at end of file
+Crash case: edit vector button is active in vector selectors
+for error bar vectors which aren't yet set. Clicking crashes.
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #972745:972746
@@ -59,6 +59,9 @@
void VectorSelector::emitSelectionChanged() {
+ if (_allowEmptySelection && (_vector->count()>0)) {
+ _editVector->setDisabled(_vector->currentIndex()==0);
+ }
emit selectionChanged(_vector->currentText());
}
@@ -108,6 +111,7 @@
if (_allowEmptySelection) {
_vector->insertItem(0, tr("<None>"), qVariantFromValue(0));
_vector->setCurrentIndex(0);
+ _editVector->setEnabled(false);
}
}
@@ -173,6 +177,7 @@
VectorPtr v = vectors.value(string);
_vector->addItem(string, qVariantFromValue(v.data()));
}
+ _editVector->setEnabled(_vector->count() > 0);
if (_allowEmptySelection) //reset the <None>
setAllowEmptySelection(true);
@@ -180,7 +185,6 @@
if (current)
setSelectedVector(current);
- _editVector->setEnabled(_vector->count() > 0);
}
}
More information about the Kst
mailing list