Commit 8cbeef8b authored by Ralf Habacker's avatar Ralf Habacker

Do not apply dpi scale twice on loading and saving of an association line

Also print information on setting resolution from file for easier
debugging.

CCBUG:90103
parent d7fdb33b
......@@ -1968,6 +1968,7 @@ QString UMLDoc::name() const
void UMLDoc::setResolution(qreal resolution)
{
m_resolution = resolution;
uDebug() << "screen dpi:" << qApp->desktop()->logicalDpiX() << "file dpi:" << resolution << "scale:" << qApp->desktop()->logicalDpiX() / resolution;
}
/**
......
......@@ -320,7 +320,7 @@ bool AssociationLine::loadFromXMI1(QDomElement &qElement)
qreal nX = toDoubleFromAnyLocale(x);
QString y = startElement.attribute(QLatin1String("starty"), QLatin1String("0"));
qreal nY = toDoubleFromAnyLocale(y);
QPointF startPoint(nX * dpiScale, nY * dpiScale);
QPointF startPoint(nX, nY);
node = startElement.nextSibling();
QDomElement endElement = node.toElement();
......@@ -331,7 +331,7 @@ bool AssociationLine::loadFromXMI1(QDomElement &qElement)
nX = toDoubleFromAnyLocale(x);
y = endElement.attribute(QLatin1String("endy"), QLatin1String("0"));
nY = toDoubleFromAnyLocale(y);
QPointF endPoint(nX * dpiScale, nY * dpiScale);
QPointF endPoint(nX, nY);
setEndPoints(startPoint * dpiScale, endPoint * dpiScale);
QPointF point;
node = endElement.nextSibling();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment