[Kst] [Bug 115969] Images shouldn't default to Y-axis autoborder, X-axis auto range

Andrew Walker arwalker at sumusltd.com
Sat Dec 3 02:32:37 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=115969         
arwalker sumusltd com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From arwalker sumusltd com  2005-12-03 02:32 -------
SVN commit 485140 by arwalker:

BUG:115969 Set y-axis to AUTO when there are only images in the plot. Previously this was AUTOBORDER

 M  +12 -2     main.cpp  


--- trunk/extragear/graphics/kst/kst/main.cpp #485139:485140
 @ -479,7 +479,9  @
 
                 if (in.sep_plots) {
                   i_plot++;
-                  if (i_plot <in.n_plots) plot = *plist.at(i_plot);
+                  if (i_plot < in.n_plots) {
+                    plot = *plist.at(i_plot);
+                  }
                 }
               }
 
 @ -683,7 +685,7  @
             } // next histogram
           } // end (if there are some histograms)
 
-          if (matrixList.count() >0) { // if there are some matrixes
+          if (matrixList.count() > 0) { // if there are some matrixes
             for (mat_i = matrixList.begin(); mat_i != matrixList.end(); ++mat_i) {
               QString tag_name = KST::suggestMatrixName(*mat_i);
               if (!file->isValidMatrix(*mat_i)) {
 @ -736,6 +738,14  @
       for (i_plot = 0; i_plot < in.n_plots; i_plot++) {
         plot = *plist.at(i_plot);
         plot->generateDefaultLabels();
+      
+        // if we have only images in a plot then set the scale mode to AUTO (instead of AUTOBORDER)
+        KstImageList images = kstObjectSubList<KstBaseCurve,KstImage>(plot->Curves);
+        if (images.count() == plot->Curves.count()) {
+          plot->setXScaleMode(AUTO);
+          plot->setYScaleMode(AUTO);
+        }
+    
         if (plot->Curves.count() > 3 || in.dolegend) {
           KstViewLegendPtr vl = plot->getOrCreateLegend();
           vl->resizeFromAspect(0.1, 0.1, 0.2, 0.1);


More information about the Kst mailing list