[Kst] [Bug 96256] Ability to quickly copy a plot

Andrew Walker arwalker at sumusltd.com
Fri Mar 18 18:34:36 CET 2005


------- 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=96256         




------- Additional Comments From arwalker sumusltd com  2005-03-18 18:34 -------
CVS commit by arwalker: 

Re-enable Edit...Copy functionality after changes to plotmimesource.cpp

CCMAIL: 96256 bugs kde org


  M +1 -14     kst.cpp   1.292
  M +5 -0      kstviewwidget.cpp   1.72


--- kdeextragear-2/kst/kst/kst.cpp  #1.291:1.292
 @ -1683,18 +1683,5  @ void KstApp::slotCopy() {
     KstViewWindow *vw = dynamic_cast<KstViewWindow*>(activeWindow());
     if (vw) {
-      KstTopLevelViewPtr tlv = vw->view();
-      if (tlv) {
-        QStringList plotList;
-        
-        for (KstViewObjectList::Iterator i = tlv->selectionList().begin(); 
-                                        i != tlv->selectionList().end(); ++i) {
-          plotList.append((*i)->tagName());
-        }
-      
-        if (plotList.size() > 0) {
-          PlotMimeSource *newplots = new PlotMimeSource(vw->caption(), plotList);
-          QApplication::clipboard()->setData(newplots, QClipboard::Clipboard);
-        }
-      }    
+      QApplication::clipboard()->setData(vw->view()->widget()->dragObject(), QClipboard::Clipboard);
     }
   }

--- kdeextragear-2/kst/kst/kstviewwidget.cpp  #1.71:1.72
 @ -58,4 +58,9  @ QDragObject *KstViewWidget::dragObject()
       plots.append(_view->pressTarget()->tagName());
       vol.append(_view->pressTarget());
+    } else {
+      for (size_t i=0; i<_view->children().size(); i++) {
+        plots.append(_view->children()[i]->tagName());
+        vol.append(_view->children()[i]);
+      }
     }
   } else {


More information about the Kst mailing list