[Kst] kst_hfi_calib_branch: kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Sat Nov 6 17:58:56 CET 2004


CVS commit by staikos: 

Sort entries to make finding the right vector somewhat sane :)


  M +4 -1      scalarselector.ui.h   1.9.2.1
  M +4 -1      vectorselector.ui.h   1.7.4.1


--- kdeextragear-2/kst/kst/scalarselector.ui.h  #1.9:1.9.2.1
@@ -25,8 +25,9 @@ void ScalarSelector::update()
     bool found = false;
     _scalar->clear();
+    QStringList scalars;
     // FIXME: missing locking?
     for (KstScalarList::Iterator i = KST::scalarList.begin(); i != KST::scalarList.end(); ++i) {
         if ((*i)->displayable()) {
-            _scalar->insertItem((*i)->tagName());
+            scalars << (*i)->tagName();
         }
         if ((*i)->tagName() == prev) {
@@ -34,4 +35,6 @@ void ScalarSelector::update()
         }
     }
+    qHeapSort(scalars);
+    _scalar->insertStringList(scalars);
     if (found) {
         _scalar->setCurrentText(prev);

--- kdeextragear-2/kst/kst/vectorselector.ui.h  #1.7:1.7.4.1
@@ -38,7 +38,8 @@ void VectorSelector::update()
       _vector->insertItem(tr("<None>"));
     }
+    QStringList vectors;
     for (KstVectorList::Iterator i = KST::vectorList.begin(); i != KST::vectorList.end(); ++i) {
       if (!(*i)->isScalarList()){
-        _vector->insertItem((*i)->tagName());
+        vectors << (*i)->tagName();
         if (!found && (*i)->tagName() == prev) {
           found = true;
@@ -46,4 +47,6 @@ void VectorSelector::update()
       }
     }
+    qHeapSort(vectors);
+    _vector->insertStringList(vectors);
     if (found) {
       _vector->setCurrentText(prev);





More information about the Kst mailing list