[Kst] kdeextragear-2/kst/kst

Rick Chern rchern at interchange.ubc.ca
Tue Jul 13 02:21:38 CEST 2004


CVS commit by rchern: 

Change createPlot DCOP function to make use of KstViewWindow::createPlot


  M +1 -21     kstiface_impl.cpp   1.38


--- kdeextragear-2/kst/kst/kstiface_impl.cpp  #1.37:1.38
@@ -610,25 +610,5 @@ QString KstIfaceImpl::createPlot(const Q
     pView = dynamic_cast<KstViewWindow*>(pWindow);
     if (pView) {
-      pTLV = pView->view();
-      Kst2DPlotList plots = pTLV->findChildrenType<Kst2DPlot>(true);
-
-      if (plots.findTag(name) != plots.end()) {
-        //suggestPlotName does not check existing plot names
-        //plotName = KST::suggestPlotName();
-        int i = plots.count() + 1;
-        QString stringnum;
-        stringnum = stringnum.setNum(i);
-        plotName = "P" + stringnum;
-        while (plots.findTag(plotName) != plots.end()) {
-          stringnum = stringnum.setNum(++i);
-          plotName = "P" + stringnum;
-        }
-      } else {
-        plotName = name;
-      }
-
-      p = pTLV->createPlot<Kst2DPlot>(plotName);
-      plotName = p->tagName();
-
+      plotName = pView->createPlot<Kst2DPlot>(name, false);
       _doc->forceUpdate();
       _doc->setModified();





More information about the Kst mailing list