[Kst] branches/work/kst/1.6/kst/src/widgets
Andrew Walker
arwalker at sumusltd.com
Fri Sep 28 21:13:42 CEST 2007
SVN commit 718460 by arwalker:
add ability to select <None> vector
M +10 -5 vectorselector.ui.h
--- branches/work/kst/1.6/kst/src/widgets/vectorselector.ui.h #718459:718460
@@ -27,10 +27,11 @@
QString VectorSelector::selectedVector()
{
KstVectorPtr ptr = *KST::vectorList.findTag(_vector->currentText());
- if (!ptr || (_provideNoneVector && _vector->currentItem() == 0))
+ if (!ptr || (_provideNoneVector && _vector->currentItem() == 0)) {
return QString::null;
- else
+ } else {
return _vector->currentText();
+ }
}
@@ -120,9 +121,13 @@
void VectorSelector::setSelection( KstVectorPtr v )
{
- v->readLock();
- setSelection(v->tagName());
- v->unlock();
+ if (v) {
+ v->readLock();
+ setSelection(v->tagName());
+ v->unlock();
+ } else if (_provideNoneVector) {
+ setSelection(tr("<None>"));
+ }
}
More information about the Kst
mailing list