r24415 by jghali - Revert previous commit until a solution is found for PDF export

scribus-commit scribus-commit at lists.scribus.net
Wed Jan 20 23:49:48 UTC 2021


Author: jghali
Date: Wed Jan 20 23:49:47 2021
New Revision: 24415

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24415
Log:
Revert previous commit until a solution is found for PDF export

Modified:
    trunk/Scribus/scribus/canvas.cpp

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24415&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Wed Jan 20 23:49:47 2021
@@ -27,7 +27,6 @@
 #include "canvasmode.h"
 #include "pageitem_textframe.h"
 #include "pageitem_group.h"
-#include "pageitemiterator.h"
 #include "prefsmanager.h"
 #include "scpage.h"
 #include "scpainter.h"
@@ -1386,33 +1385,21 @@
 			continue;
 		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
 			continue;
-		double oldX = currItem->xPos();
-		double oldY = currItem->yPos();
-		double oldBX = currItem->BoundingX;
-		double oldBY = currItem->BoundingY;
+		double OldX = currItem->xPos();
+		double OldY = currItem->yPos();
+		double OldBX = currItem->BoundingX;
+		double OldBY = currItem->BoundingY;
 		if (!currItem->ChangedMasterItem)
 		{
 			//Hack to not check for undo changes, indicate drawing only
 			currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
-			currItem->BoundingX = oldBX - Mp->xOffset() + page->xOffset();
-			currItem->BoundingY = oldBY - Mp->yOffset() + page->yOffset();
-		}
-		// Save PageItem's OwnPage and set its value to page number
-		// so that page number placed in text frames can work, also modify
-		// OwnPage of items embeded inside groups for same reason
+			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+		}
 		currItem->savedOwnPage = currItem->OwnPage;
 		currItem->OwnPage = page->pageNr();
-		if (currItem->isGroup())
-		{
-			PageItem_Group *groupItem = currItem->asGroupFrame();
-			PageItemIterator itemIt(groupItem->groupItemList, PageItemIterator::IterateInGroups);
-			for ( ; *itemIt; ++itemIt)
-			{
-				PageItem* item = *itemIt;
-				item->savedOwnPage = currItem->OwnPage;
-				item->OwnPage = page->pageNr();
-			}
-		}
+//FIXME						if (!evSpon || forceRedraw)
+//					currItem->invalid = true;
 		if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
 		{
 			if (!((m_viewMode.operItemMoving) && (currItem->isSelected())))
@@ -1422,27 +1409,16 @@
 				currItem->DrawObj(painter, cullingArea);
 				currItem->DrawObj_Decoration(painter);
 			}
-//			else 
-//				qDebug() << "skip masterpage item (move/resizeEdit/selected)" << m_viewMode.operItemMoving << currItem->isSelected();
-		}
-		// Restore items' OwnPage including those of item embedded inside groups 
-		if (currItem->isGroup())
-		{
-			PageItem_Group *groupItem = currItem->asGroupFrame();
-			PageItemIterator itemIt(groupItem->groupItemList, PageItemIterator::IterateInGroups);
-			for ( ; *itemIt; ++itemIt)
-			{
-				PageItem* item = *itemIt;
-				item->OwnPage = item->savedOwnPage;
-			}
+//							else 
+//								qDebug() << "skip masterpage item (move/resizeEdit/selected)" << m_viewMode.operItemMoving << currItem->isSelected();
 		}
 		currItem->OwnPage = currItem->savedOwnPage;
 		if (!currItem->ChangedMasterItem)
 		{
 			//Hack to not check for undo changes, indicate drawing only
-			currItem->setXYPos(oldX, oldY, true);
-			currItem->BoundingX = oldBX;
-			currItem->BoundingY = oldBY;
+			currItem->setXYPos(OldX, OldY, true);
+			currItem->BoundingX = OldBX;
+			currItem->BoundingY = OldBY;
 		}
 	}
 	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))




More information about the scribus-commit mailing list