r22088 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 28 17:32:38 UTC 2017


Author: jghali
Date: Wed Jun 28 17:32:38 2017
New Revision: 22088

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22088
Log:
fix crop rect not being drawn correctly in PDF import options dialog when media box origin is different from (0.0, 0.0)

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22088&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	Wed Jun 28 17:32:38 2017
@@ -918,6 +918,7 @@
 {
 	if (!m_pdfDoc)
 		return QImage();
+	
 	double h = m_pdfDoc->getPageMediaHeight(pgNum);
 	double w = m_pdfDoc->getPageMediaWidth(pgNum);
 	double scale = qMin(height / h, width / w);
@@ -958,6 +959,8 @@
 	if (box > Media_Box)
 	{
 		QRectF cRect = getCBox(box, pgNum);
+		QRectF mediaRect = getCBox(0, pgNum);
+		cRect.moveTo(cRect.x() - mediaRect.x(), cRect.y() - mediaRect.y());
 		QPainter pp;
 		pp.begin(&image);
 		pp.setBrush(Qt::NoBrush);




More information about the scribus-commit mailing list