[Kst] extragear/graphics/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Tue Mar 28 21:22:18 CEST 2006


SVN commit 523662 by arwalker:

Correct the naming convention

 M  +7 -2      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #523661:523662
@@ -443,7 +443,7 @@
   KstApp *app = KstApp::inst();
   KMdiIterator<KMdiChildView*> *iter;
   bool duplicate = true;
-  static int last = 0;
+  int last = 0;
   
   // check for unique plot name
   while (duplicate) {
@@ -454,8 +454,13 @@
       KstViewWindow *viewwindow = dynamic_cast<KstViewWindow*>(childview);
       if (viewwindow) {
         if (viewwindow->view()->findChild(plotName)) {
+          if (last == 0) {
+            plotName = i18n("%1-copy").arg(plot.tagName());
+          } else {
+            plotName = i18n("%1-copy%2").arg(plot.tagName()).arg(last);
+          }
           ++last;
-          plotName = i18n("%1-copy%2").arg(last).arg(plot.tagName());
+          
           duplicate = true;
           break;
         }


More information about the Kst mailing list