r14531 by jghali - #8719: Master page items not updated when changing color management properties

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 18 01:15:24 CET 2010


Revision: 14531
Author: jghali
Date: 2010-01-17T10:24:19.831943Z
Commit message: #8719: Master page items not updated when changing color management properties 

Changeset: 
M  /branches/Version135/Scribus/scribus/scribusdoc.cpp
M  /branches/Version135/Scribus/scribus/scribusdoc.h

Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14530)
+++ scribus/scribusdoc.cpp	(revision 14531)
@@ -883,7 +883,7 @@
 {
 	m_ScMW->setStatusBarInfoText( tr("Adjusting Colors"));
 	m_ScMW->mainWindowProgressBar->reset();
-	int cc = PageColors.count() + Items->count();
+	int cc = PageColors.count() + MasterItems.count() + DocItems.count();
 	m_ScMW->mainWindowProgressBar->setMaximum(cc);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	bool oldCM = CMSSettings.CMSinUse;
@@ -5158,7 +5158,13 @@
 //CB Moved from view
 void ScribusDoc::RecalcPictures(ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia)
 {
-	uint docItemCount=Items->count();
+	RecalcPictures(&MasterItems, Pr, PrCMYK, dia);
+	RecalcPictures(&DocItems, Pr, PrCMYK, dia);
+}
+
+void ScribusDoc::RecalcPictures(QList<PageItem*>* items, ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia)
+{
+	uint docItemCount=items->count();
 	if ( docItemCount!= 0)
 	{
 		bool usingGUI=ScCore->usingGUI();
@@ -5168,7 +5174,7 @@
 		PageItem* it;
 		for (uint i=0; i < docItemCount; ++i)
 		{
-			it = Items->at(i);
+			it = items->at(i);
 			if ((it->itemType() == PageItem::ImageFrame) && (it->PictureIsAvailable))
 			{
 				if (it->pixm.imgInfo.colorspace == ColorSpaceCMYK)
@@ -5181,7 +5187,7 @@
 					if (!Pr->contains(it->IProfile))
 						it->IProfile = CMSSettings.DefaultImageRGBProfile;
 				}
-				LoadPict(it->Pfile, i, true);
+				loadPict(it->Pfile, it, true);
 			}
 			if (usingGUI)
 			{
Index: scribus/scribusdoc.h
===================================================================
--- scribus/scribusdoc.h	(revision 14530)
+++ scribus/scribusdoc.h	(revision 14531)
@@ -673,6 +673,14 @@
 	 */
 	void RecalcPictures(ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia = 0);
 	/**
+	 * \brief Handle image with color profiles
+	 * @param items list of page items to update
+	 * @param Pr profile
+	 * @param PrCMYK cmyk profile
+	 * @param dia optional progress widget
+	 */
+	void RecalcPictures(QList<PageItem*>* items, ProfilesL *Pr, ProfilesL *PrCMYK, QProgressBar *dia = 0);
+	/**
 	 * @brief Find the minX,MinY and maxX,maxY for the canvas required for the doc
 	 */
 	void canvasMinMax(FPoint&, FPoint&);




More information about the scribus-commit mailing list