summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2009-01-04 10:31:22 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2009-01-04 10:31:22 +0100
commite96f9e73864f3d6b7fdc3262ba6851c416bc32a4 (patch)
treee1ed9ae6aaac9869be5390c95e26a4378cba8d3d
parentc9d33cc0edffa4f22a385a3debc29415b6b54218 (diff)
downloaddbmodel-e96f9e73864f3d6b7fdc3262ba6851c416bc32a4.tar.gz
dbmodel-e96f9e73864f3d6b7fdc3262ba6851c416bc32a4.tar.bz2
Load item position as floating point numbers, not integers.
-rw-r--r--src/diagramitem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diagramitem.cpp b/src/diagramitem.cpp
index 3079590..1d32ff3 100644
--- a/src/diagramitem.cpp
+++ b/src/diagramitem.cpp
@@ -38,9 +38,9 @@ DiagramItem::loadFromXml(QDomElement element, DiagramDocument *)
setId(element.attribute("id", QUuid()));
QDomElement positionElement = element.firstChildElement("position");
if (!positionElement.isNull()) {
- QPoint pos;
- pos.setX(positionElement.attribute("x", "0").toInt());
- pos.setY(positionElement.attribute("y", "0").toInt());
+ QPointF pos;
+ pos.setX(positionElement.attribute("x", "0").toDouble());
+ pos.setY(positionElement.attribute("y", "0").toDouble());
setPos(pos);
}
}