Bug 129699 - Tick mark spacing is not saved in the .kst
Summary: Tick mark spacing is not saved in the .kst
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 11:58 UTC by Nicolas Brisset
Modified: 2006-06-23 18:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2006-06-23 11:58:13 UTC
Version:           1.3.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

Tick mark spacing (X or Y axis) is not saved in the .kst, so that plot properties are not correctly restored when the file is re-read.

To reproduce:
1) create a curve from any file (e.g. gyrodata.dat)
2) save the file e.g. standard.kst
3) plot dialog->X axis->Tick marks, spacing: set to very fine
4) save a new file, e.g. fine.kst
5) close everything, and reload fine.kst: the spacing is back to default
6) look in the .kst: the info is not saved (which explains the previous behavior!)

Expected result: that property is stored in the .kst and the plot restored with the right settings.
Comment 1 Andrew Walker 2006-06-23 18:32:27 UTC
SVN commit 554308 by arwalker:

BUG:129699 Remember the major tick spacing when saving and loading files

 M  +8 -0      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #554307:554308
@@ -325,6 +325,10 @@
         _majorGridColorDefault = el.text() != "0";
       } else if (el.tagName() == "minorgridcolordefault") {
         _minorGridColorDefault = el.text() != "0";
+      } else if (el.tagName() == "ymajorticks") {
+        _yMajorTicks = el.text().toInt();
+      } else if (el.tagName() == "xmajorticks") {
+        _xMajorTicks = el.text().toInt();
       } else if (el.tagName() == "xinterpret") {
         _isXAxisInterpreted = el.text() != "0";
       } else if (el.tagName() == "xinterpretas") {
@@ -2837,6 +2841,10 @@
   ts << indent << "<xminorticks>" << _reqXMinorTicks << "</xminorticks>" << endl;
   ts << indent << "<yminorticks>" << _reqYMinorTicks << "</yminorticks>" << endl;
 
+  // major ticks
+  ts << indent << "<xmajorticks>" << _xMajorTicks << "</xmajorticks>" << endl;
+  ts << indent << "<ymajorticks>" << _yMajorTicks << "</ymajorticks>" << endl;
+
   // tick placement
   ts << indent << "<xticksinplot>" << _xTicksInPlot << "</xticksinplot>" << endl;
   ts << indent << "<xticksoutplot>" << _xTicksOutPlot << "</xticksoutplot>" << endl;