r21461 by jghali - #14307: incorrect export of nested groups to PDF

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 11 20:01:52 UTC 2016


Author: jghali
Date: Tue Oct 11 20:01:52 2016
New Revision: 21461

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21461
Log:
#14307: incorrect export of nested groups to PDF

Modified:
    branches/Version14x/Scribus/scribus/pdflib_core.cpp

Modified: branches/Version14x/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21461&path=/branches/Version14x/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdflib_core.cpp	(original)
+++ branches/Version14x/Scribus/scribus/pdflib_core.cpp	Tue Oct 11 20:01:52 2016
@@ -3246,9 +3246,9 @@
 
 	int groupID = -1;
 	if (item->isGroupControl && item->Groups.count() > 1)
-		groupID = topItem->Groups.first();
+		groupID = topItem->Groups.last();
 	if (!item->isGroupControl && item->Groups.count() > 0)
-		groupID = topItem->Groups.first();
+		groupID = topItem->Groups.last();
 
 	if (groupID >= 0)
 	{
@@ -3278,7 +3278,9 @@
 	double w2 = qMax(topItem->BoundingW + ilw, 1.0);
 	double h2 = qMax(topItem->BoundingH + ilw, 1.0);
 
-	if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
+	QRectF pageRect(x, y, w, h1);
+	QRectF itemRect(x2, y2, w2, h2);
+	if (!itemRect.intersects(pageRect))
 		return false;
 	return true;
 }




More information about the scribus-commit mailing list