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.
preferencesAboutTextFull
Craig Watson 9 years ago
parent 2fa97ecf79
commit 2cec22c91d
  1. 4
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -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");

Loading…
Cancel
Save