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. 6
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -1034,7 +1034,11 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::writeSvgElement()
mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "crossed-background", mScene->isCrossedBackground() ? xmlTrue : xmlFalse);
QDesktopWidget* desktop = UBApplication::desktop();
mXmlWriter.writeAttribute("pageDpi", QString("%1").arg((desktop->physicalDpiX() + desktop->physicalDpiY()) / 2));
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.writeStartElement("rect");
mXmlWriter.writeAttribute("fill", mScene->isDarkBackground() ? "black" : "white");

Loading…
Cancel
Save