[Kst] branches/work/kst/portto4/kst/src/libkstapp
Mike Fenton
mike at staikos.net
Fri Apr 4 22:01:05 CEST 2008
SVN commit 793684 by fenton:
Fix for significant digits on automatic base/offset mode.
Fix for Load of plot item with adjusted projectionRect.
M +1 -1 plotitem.cpp
M +5 -2 plotrenderitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #793683:793684
@@ -480,7 +480,7 @@
label += "+";
}
label += "[";
- label += QString::number(offset, 'g', _xAxisSignificantDigits);
+ label += QString::number(offset);
label += "]";
xLabels.insert(i.key(), label);
}
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitem.cpp #793683:793684
@@ -185,6 +185,8 @@
bool PlotRenderItem::configureFromXml(QXmlStreamReader &xml, ObjectStore *store) {
bool validTag = true;
+ double x = 0, y = 0, w = 10, h = 10;
+
QString primaryTag = xml.name().toString();
QXmlStreamAttributes attrs = xml.attributes();
QStringRef av;
@@ -205,7 +207,7 @@
while (!(xml.isEndElement() && (xml.name().toString() == primaryTag))) {
if (xml.isStartElement() && xml.name().toString() == "rect") {
expectedEnd = xml.name().toString();
- double x = 0, y = 0, w = 10, h = 10;
+ attrs = xml.attributes();
av = attrs.value("width");
if (!av.isNull()) {
w = av.toString().toDouble();
@@ -222,7 +224,6 @@
if (!av.isNull()) {
y = av.toString().toDouble();
}
- setProjectionRect(QRectF(QPointF(x, y), QSizeF(w, h)));
} else if (xml.isStartElement() && xml.name().toString() == "relation") {
expectedEnd = xml.name().toString();
attrs = xml.attributes();
@@ -240,6 +241,8 @@
}
xml.readNext();
}
+ setProjectionRect(QRectF(QPointF(x, y), QSizeF(w, h)));
+
return validTag;
}
More information about the Kst
mailing list