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

Barth Netterfield netterfield at astro.utoronto.ca
Wed Sep 21 17:26:16 UTC 2011


SVN commit 1254850 by netterfield:

BUG: editable matrixes could not load their name info.  Now they can.
BUG: on reload from a session file, plot ranges were not respected if zoomsr
were tied when saved.  Now they are


 M  +1 -1      libkst/editablematrix.cpp  
 M  +2 -2      libkstapp/plotitem.cpp  


--- branches/work/kst/portto4/kst/src/libkst/editablematrix.cpp #1254849:1254850
@@ -49,6 +49,7 @@
   }
 
   xml.writeStartElement(staticTypeTag);
+  saveNameInfo(xml, VNUM|MNUM|XNUM);
   xml.writeAttribute("xmin", QString::number(minX()));
   xml.writeAttribute("ymin", QString::number(minY()));
   xml.writeAttribute("nx", QString::number(xNumSteps()));
@@ -56,7 +57,6 @@
   xml.writeAttribute("xstep", QString::number(xStepSize()));
   xml.writeAttribute("ystep", QString::number(yStepSize()));
   xml.writeTextElement("data", qCompress(qba).toBase64());
-  saveNameInfo(xml, VNUM|MNUM|XNUM);
   xml.writeEndElement();
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1254849:1254850
@@ -3778,6 +3778,7 @@
 ViewItem* PlotItemFactory::generateGraphics(QXmlStreamReader& xml, ObjectStore *store, View *view, ViewItem *parent) {
   PlotItem *rc = 0;
   double x = 0, y = 0, w = 10, h = 10;
+  bool xTiedZoom = false, yTiedZoom = false;
   while (!xml.atEnd()) {
     bool validTag = true;
     if (xml.isStartElement()) {
@@ -3794,7 +3795,6 @@
           rc->setParentViewItem(parent);
         }
 
-        bool xTiedZoom = false, yTiedZoom = false;
         av = attrs.value("tiedxzoom");
         if (!av.isNull()) {
           xTiedZoom = QVariant(av.toString()).toBool();
@@ -3803,7 +3803,6 @@
         if (!av.isNull()) {
           yTiedZoom = QVariant(av.toString()).toBool();
         }
-        rc->setTiedZoom(xTiedZoom, yTiedZoom);
         av = attrs.value("leftlabelvisible");
         if (!av.isNull()) {
           rc->leftLabelDetails()->setVisible(QVariant(av.toString()).toBool());
@@ -3946,6 +3945,7 @@
     xml.readNext();
   }
   rc->setProjectionRect(QRectF(QPointF(x, y), QSizeF(w, h)));
+  rc->setTiedZoom(xTiedZoom, yTiedZoom);
   return rc;
 }
 


More information about the Kst mailing list