[Kst] branches/work/kst/1.5/kst/src/kst

Andrew Walker arwalker at sumusltd.com
Wed May 2 19:07:00 CEST 2007


SVN commit 660418 by arwalker:

BUG:141612 Set the default window size to something reasonable the first time kst is run. On subsequent runs the value from kstrc will be used. Fixed for 1.5 release. Also removed obsolete FIXMEs.

 M  +5 -2      main.cpp  


--- branches/work/kst/1.5/kst/src/kst/main.cpp #660417:660418
@@ -24,6 +24,7 @@
 #include <kaboutdata.h>
 #include <kcmdlineargs.h>
 #include "ksdebug.h"
+#include <kglobalsettings.h>
 #include <kimageio.h>
 
 #include "dialoglauncher-gui.h"
@@ -415,6 +416,8 @@
 
     if (!print_and_exit) {
       app.setMainWidget(kst);
+      QRect rect = KGlobalSettings::desktopGeometry(kst);
+      kst->resize(5 * rect.width() / 6, 5 * rect.height() / 6);
       kst->show();
     }
 
@@ -542,7 +545,7 @@
                 if (yvector) {
                   // make the curves
                   color = KstColorSequence::next(vcurves,plot->backgroundColor());
-                  curve = new KstVCurve(KST::suggestCurveName(yvector->tag(), false), // FIXME: this was yvector->field(), is this right?
+                  curve = new KstVCurve(KST::suggestCurveName(yvector->tag(), false),
                                       KstVectorPtr(xvector), KstVectorPtr(yvector),
                                       0L, 0L, 0L, 0L, color);
                   if (in.has_points) {
@@ -667,7 +670,7 @@
 
                 KstHistogram::AutoBin(KstVectorPtr(yvector), &N, &max, &min);
 
-                hs = new KstHistogram(KST::suggestHistogramName(yvector->tag()), // FIXME: this was yvector->field(), is this right?
+                hs = new KstHistogram(KST::suggestHistogramName(yvector->tag()),
                     KstVectorPtr(yvector), min, max, N, KST_HS_NUMBER);
                 KstVCurvePtr vc = new KstVCurve(KST::suggestCurveName(hs->tag(), true),
                     hs->vX(), hs->vY(),


More information about the Kst mailing list