[Kst] [Bug 147217] Up/Down arrows in Plot Contents don't enable Apply button

Andrew Walker arwalker at sumusltd.com
Mon Jun 25 22:40:32 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=147217         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2007-06-25 22:40 -------
SVN commit 680291 by arwalker:

BUG:147217 Enable Apply button after moving curves up or down in the displayed objects list

 M  +2 -2      kst2dplot.cpp  
 M  +18 -3     kst2dplotwidget_i.cpp  
 M  +2 -0      kst2dplotwidget_i.h  
 M  +1 -1      labelrenderer.cpp  


--- branches/work/kst/1.5/kst/src/libkstapp/kst2dplot.cpp #680290:680291
 @ -1953,7 +1953,7  @
   tp.labels.clear();
   tp.oppLabels.clear();
   tp.delta = false;
-  
+
   if (isLog && isInterpreted) {
     setTicks(tp.tick, tp.org, Max + log10(range) + log10(scale), Min + log10(range) + log10(scale), isLog, logBase, isX, base);
     tp.org -= log10(range) + log10(scale);
 @ -1962,7 +1962,7  @
     tp.tick /= range*scale;
     tp.org  /= range*scale;
   }
-    
+
   tp.iLo = int((Min-tp.org)/tp.tick);
   tp.iHi = int((Max-tp.org)/tp.tick)+1;
   iShort = tp.iLo;
--- branches/work/kst/1.5/kst/src/libkstapp/kst2dplotwidget_i.cpp #680290:680291
 @ -94,8 +94,8  @
   connect(AvailableCurveList, SIGNAL(selectionChanged()), this, SLOT(updateButtons()));
   connect(_remove, SIGNAL(clicked()), this, SLOT(removeDisplayedCurve()));
   connect(_add, SIGNAL(clicked()), this, SLOT(addDisplayedCurve()));
-  connect(_up, SIGNAL(clicked()), DisplayedCurveList, SLOT(up()));
-  connect(_down, SIGNAL(clicked()), DisplayedCurveList, SLOT(down()));
+  connect(_up, SIGNAL(clicked()), this, SLOT(upDisplayedCurve()));
+  connect(_down, SIGNAL(clicked()), this, SLOT(downDisplayedCurve()));
 
   connect(AutoLabel, SIGNAL(clicked()), this, SLOT(generateDefaultLabels()));
 
 @ -315,8 +315,8  @
       if (DisplayedCurveList->isSelected(i)) {
         AvailableCurveList->insertItem(DisplayedCurveList->text(i));
         DisplayedCurveList->removeItem(i);
+      }
     }
-    }
     updateButtons();
     emit changed();
   }
 @ -324,7 +324,22  @
 }
 
 
+void Kst2dPlotWidget::upDisplayedCurve()
+{
+  if (DisplayedCurveList->up()) {
+    emit changed();
+  }
+}
 
+
+void Kst2dPlotWidget::downDisplayedCurve()
+{
+  if (DisplayedCurveList->down()) {
+    emit changed();
+  }
+}
+
+
 void Kst2dPlotWidget::fillMarkerLineCombo() {
   QRect rect = _comboMarkerLineStyle->style().querySubControlMetrics(QStyle::CC_ComboBox, _comboMarkerLineStyle, QStyle::SC_ComboBoxEditField);
   rect.setLeft(rect.left() + 2);
--- branches/work/kst/1.5/kst/src/libkstapp/kst2dplotwidget_i.h #680290:680291
 @ -35,6 +35,8  @
   public slots:
     void generateDefaultLabels();
     void updateButtons();
+    void upDisplayedCurve();
+    void downDisplayedCurve();
     void addDisplayedCurve();
     void removeDisplayedCurve();
     void fillMarkerLineCombo();
--- branches/work/kst/1.5/kst/src/libkstapp/labelrenderer.cpp #680290:680291
 @ -63,7 +63,7  @
       // not an object reference
       continue;
     }
-    
+
 //    kstdWarning() << "Label references unknown object [" << fi->text << "]." << endl;
     return false;
   }


More information about the Kst mailing list