[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 16 03:40:13 CEST 2003


CVS commit by staikos: 

fix various label drag issues as discussed on the list, including:

- labels may only be dragged in label mode
- labels may be editted and deleted again


  M +3 -2      kstmouse.cpp   1.10
  M +1 -0      kstview.cpp   1.35


--- kdeextragear-2/kst/kst/kstmouse.cpp  #1.9:1.10
@@ -201,10 +201,11 @@ void KstMouse::mousePressedInPlot(const 
 
 void KstMouse::setCursor(bool in_plot, const QMouseEvent *e) {
-//  if (_view->ParentApp->getMouseZoomRadio() == LABEL_TOOL) {
+  if (_view->ParentApp->getMouseZoomRadio() == LABEL_TOOL) {
     if (getLabelNum(e) >= 0) {
       _view->setCursor(*ArrowCursor);
+      setMode(LABEL_TOOL);
       return;
     }
-//  }
+  }
 
   setCursor(in_plot, e->state());

--- kdeextragear-2/kst/kst/kstview.cpp  #1.34:1.35
@@ -359,4 +359,5 @@ void KstView::mouseMoveEvent(QMouseEvent
 
   if (e->state() & Qt::LeftButton &&
+        MouseInfo->getMode() == LABEL_TOOL &&
         (i_label = MouseInfo->getLabelNum(e)) >= 0 &&
         _draggableLabel == i_label &&




More information about the Kst mailing list