Commit 2cec22c9 authored by Craig Watson's avatar Craig Watson

Quick fix for issue #14

Page DPI is now saved as the DPI that was read when opening the file.
While not a perfectly fool-proof fix, it will at least allow files to be
migrated between OB 1.02 and 1.10.
parent 2fa97ecf
...@@ -1034,6 +1034,10 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement() ...@@ -1034,6 +1034,10 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement()
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "crossed-background", mScene->isCrossedBackground() ? xmlTrue : xmlFalse); mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "crossed-background", mScene->isCrossedBackground() ? xmlTrue : xmlFalse);
QDesktopWidget* desktop = UBApplication::desktop(); QDesktopWidget* desktop = UBApplication::desktop();
if (UBSettings::settings()->pageDpi->get() != 0)
mXmlWriter.writeAttribute("pageDpi", (UBSettings::settings()->pageDpi->get()).toString());
else
mXmlWriter.writeAttribute("pageDpi", QString("%1").arg((desktop->physicalDpiX() + desktop->physicalDpiY()) / 2)); mXmlWriter.writeAttribute("pageDpi", QString("%1").arg((desktop->physicalDpiX() + desktop->physicalDpiY()) / 2));
mXmlWriter.writeStartElement("rect"); mXmlWriter.writeStartElement("rect");
......
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