r23319 by jghali - Comment out temporarily a few adjustItemSize() call in PDF importer due to bad interactions between adjustItemSize() and resizeGroupToContents() + small fixes related to gradient import

scribus-commit scribus-commit at lists.scribus.net
Mon Nov 4 08:20:42 UTC 2019


Author: jghali
Date: Mon Nov  4 08:20:42 2019
New Revision: 23319

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23319
Log:
Comment out temporarily a few adjustItemSize() call in PDF importer due to bad interactions between adjustItemSize() and resizeGroupToContents() + small fixes related to gradient import

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

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23319&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Mon Nov  4 08:20:42 2019
@@ -1304,14 +1304,16 @@
 				PageItem *ite = m_doc->groupObjectsSelection(tmpSel);
 				if (ite)
 				{
-					ite->ClipEdited = true;
-					ite->FrameType = 3;
 					FPointArray out = m_currentClipPath.copy();
 					out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
 					out.translate(-ite->xPos(), -ite->yPos());
 					ite->PoLine = out.copy();
+					ite->ClipEdited = true;
+					ite->FrameType = 3;
 					ite->setTextFlowMode(PageItem::TextFlowDisabled);
-					m_doc->adjustItemSize(ite, true);
+					// Comment out temporarily, there are some bad interactions between adjustItemSize() and
+					// resizeGroupToContents() since fixing resizing of multiple selections
+					//m_doc->adjustItemSize(ite, true);
 					m_doc->resizeGroupToContents(ite);
 					ite->OldB2 = ite->width();
 					ite->OldH2 = ite->height();
@@ -1434,8 +1436,12 @@
 			out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
 			out.translate(-ite->xPos(), -ite->yPos());
 			ite->PoLine = out.copy();
+			ite->ClipEdited = true;
+			ite->FrameType = 3;
 			ite->setTextFlowMode(PageItem::TextFlowDisabled);
-			m_doc->adjustItemSize(ite, true);
+			// Comment out temporarily, there are some bad interactions between adjustItemSize() and
+			// resizeGroupToContents() since fixing resizing of multiple selections
+			//m_doc->adjustItemSize(ite, true);
 			m_doc->resizeGroupToContents(ite);
 			ite->OldB2 = ite->width();
 			ite->OldH2 = ite->height();
@@ -1823,8 +1829,8 @@
 	if (checkClip())
 	{
 		FPointArray out = m_currentClipPath.copy();
-		FPoint wh(getMinClipF(&out));
-		out.translate(-wh.x(), -wh.y());
+		out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
+		out.translate(-ite->xPos(), -ite->yPos());
 		ite->PoLine = out.copy();
 	}
 	ite->ClipEdited = true;
@@ -1943,8 +1949,8 @@
 	if (checkClip())
 	{
 		FPointArray out = m_currentClipPath.copy();
-		FPoint wh(getMinClipF(&out));
-		out.translate(-wh.x(), -wh.y());
+		out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
+		out.translate(-ite->xPos(), -ite->yPos());
 		ite->PoLine = out.copy();
 	}
 	ite->ClipEdited = true;
@@ -2299,8 +2305,8 @@
 	if (checkClip())
 	{
 		FPointArray out = m_currentClipPath.copy();
-		FPoint wh(getMinClipF(&out));
-		out.translate(-wh.x(), -wh.y());
+		out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
+		out.translate(-ite->xPos(), -ite->yPos());
 		ite->PoLine = out.copy();
 	}
 	ite->ClipEdited = true;
@@ -2981,8 +2987,10 @@
 		out.translate(m_doc->currentPage()->xOffset(), m_doc->currentPage()->yOffset());
 		out.translate(-ite->xPos(), -ite->yPos());
 		ite->PoLine = out.copy();
+		ite->ClipEdited = true;
+		ite->FrameType = 3;
 		FPoint wh = getMaxClipF(&ite->PoLine);
-		ite->setWidthHeight(wh.x(),wh.y());
+		ite->setWidthHeight(wh.x(), wh.y());
 		ite->setTextFlowMode(PageItem::TextFlowDisabled);
 		ite->ScaleType   = true;
 		m_doc->adjustItemSize(ite);




More information about the scribus-commit mailing list