[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Mon Jul 12 18:51:31 CEST 2004


CVS commit by arwalker: 

Moving of plots by drag-and-drop is not yet supported, so the UI has been modified to reflect this.
Use the context menu Move To instead for this functionality.


  M +8 -4      kstviewwidget.cpp   1.48


--- kdeextragear-2/kst/kst/kstviewwidget.cpp  #1.47:1.48
@@ -275,5 +275,4 @@ void KstViewWidget::paint() {
 // Note: e can be null
 void KstViewWidget::paintEvent(QPaintEvent *e) {
-    //Q_UNUSED(e)
   if ( e ) {  // Resize/expose/etc triggered by X11
     _view->paint(P_PAINT);
@@ -290,7 +289,7 @@ void KstViewWidget::dragEnterEvent(QDrag
       QApplication::sendEvent(this, &keyEvent);
       _view->restartMove();
-      e->accept(false);
     } else {
-      e->acceptAction(true);
+      // FIXME: change to true once plot drag-drop is functional...
+      e->acceptAction(false);
     }
   } else if (_view->viewMode() != KstTopLevelView::LayoutMode) {
@@ -308,5 +307,6 @@ void KstViewWidget::dragEnterEvent(QDrag
 void KstViewWidget::dragMoveEvent(QDragMoveEvent *e) {
   if (_dragEnabled && e->provides(KstPlotDrag::mimeType())) {
-    e->accept(true);
+    // FIXME: change to true once plot drag-drop is functional...
+    e->accept(false);
   } else if (_view->viewMode() != KstTopLevelView::LayoutMode) {
     KstViewObjectPtr vo = findChildFor(e->pos());
@@ -329,4 +329,7 @@ void KstViewWidget::dragLeaveEvent(QDrag
 void KstViewWidget::dropEvent(QDropEvent *e) {
   if (e->source() != this && e->provides(KstPlotDrag::mimeType())) {
+    // FIXME: revert code once plot drag-drop is functional...
+    e->acceptAction(false);
+/*
     // FIXME: support both copy and move
     QByteArray a = e->encodedData(KstPlotDrag::mimeType());
@@ -338,4 +341,5 @@ void KstViewWidget::dropEvent(QDropEvent
     e->acceptAction(true);
     _view->paint(P_PAINT);
+*/
   } else if (_view->viewMode() != KstTopLevelView::LayoutMode) {
     KstViewObjectPtr vo = findChildFor(e->pos());





More information about the Kst mailing list